home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 3 / CD ACTUAL 3.iso / linux / docs / linux-do / network- / nag-1.002 / nag-1 / TheGuide / inet / appl.tex
LaTeX Document  |  1994-08-17  |  38.3 KB

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: LaTeX Document (document/latex).

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert LaTeX Document (document/latex) magic Supported
1% dexvert Corel 10 Texture (image/corel10Texture) ext Unsupported
1% dexvert Text File (text/txt) fallback Supported
100% file LaTeX document text default
99% file LaTeX document, ASCII text default
100% checkBytes Printable ASCII default
100% perlTextCheck Likely Text (Perl) default
100% siegfried fmt/281 LaTeX (Subdocument) default
100% detectItEasy Format: Plain text[LF] default
100% xdgMime text/x-matlab default (weak)



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|00000010| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|00000020| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|00000030| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|00000040| 25 0a 25 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |%.% | |
|00000050| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000060| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000070| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000080| 20 20 25 0a 25 20 20 20 | 20 20 20 20 20 20 20 20 | %.% | |
|00000090| 20 20 20 20 20 20 20 20 | 20 20 20 20 4c 65 67 61 | | Lega|
|000000a0| 6c 20 4e 6f 74 69 63 65 | 20 20 20 20 20 20 20 20 |l Notice| |
|000000b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000000c0| 20 20 20 20 25 0a 25 20 | 20 20 20 20 20 20 20 20 | %.% | |
|000000d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000000e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000000f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000100| 20 20 20 20 20 20 25 0a | 25 20 54 68 69 73 20 64 | %.|% This d|
|00000110| 6f 63 75 6d 65 6e 74 20 | 69 73 20 63 6f 70 79 72 |ocument |is copyr|
|00000120| 69 67 68 74 20 28 43 29 | 20 4f 6c 61 66 20 4b 69 |ight (C)| Olaf Ki|
|00000130| 72 63 68 2c 20 6f 6b 69 | 72 40 6d 6f 6e 61 64 2e |rch, oki|r@monad.|
|00000140| 73 77 62 2e 64 65 20 20 | 25 0a 25 20 20 20 20 20 |swb.de |%.% |
|00000150| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000160| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000170| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000180| 20 20 20 20 20 20 20 20 | 20 20 25 0a 25 20 46 6f | | %.% Fo|
|00000190| 72 20 63 6f 70 79 69 6e | 67 20 63 6f 6e 64 69 74 |r copyin|g condit|
|000001a0| 69 6f 6e 73 2c 20 70 6c | 65 61 73 65 20 72 65 66 |ions, pl|ease ref|
|000001b0| 65 72 20 74 6f 20 74 68 | 65 20 66 69 6c 65 20 43 |er to th|e file C|
|000001c0| 4f 50 59 49 4e 47 2e 09 | 25 0a 25 20 20 20 20 20 |OPYING..|%.% |
|000001d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000001e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000001f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000200| 20 20 20 20 20 20 20 20 | 20 20 25 0a 25 20 54 68 | | %.% Th|
|00000210| 65 20 61 75 74 68 6f 72 | 20 69 73 20 6e 6f 74 20 |e author| is not |
|00000220| 6c 69 61 62 6c 65 20 66 | 6f 72 20 61 6e 79 20 64 |liable f|or any d|
|00000230| 61 6d 61 67 65 73 2c 20 | 64 69 72 65 63 74 20 6f |amages, |direct o|
|00000240| 72 20 69 6e 64 69 72 65 | 63 74 2c 20 25 0a 25 20 |r indire|ct, %.% |
|00000250| 72 65 73 75 6c 74 69 6e | 67 20 66 72 6f 6d 20 74 |resultin|g from t|
|00000260| 68 65 20 75 73 65 20 6f | 66 20 69 6e 66 6f 72 6d |he use o|f inform|
|00000270| 61 74 69 6f 6e 20 70 72 | 6f 76 69 64 65 64 20 69 |ation pr|ovided i|
|00000280| 6e 20 74 68 69 73 20 20 | 20 20 20 20 20 20 25 0a |n this | %.|
|00000290| 25 20 64 6f 63 75 6d 65 | 6e 74 2e 20 20 20 20 20 |% docume|nt. |
|000002a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000002b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000002c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000002d0| 25 0a 25 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |%.% | |
|000002e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000002f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000300| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000310| 20 20 25 0a 25 25 25 25 | 25 25 25 25 25 25 25 25 | %.%%%%|%%%%%%%%|
|00000320| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|00000330| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|00000340| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|00000350| 25 25 25 25 25 0a 25 20 | 57 68 65 6e 20 76 69 65 |%%%%%.% |When vie|
|00000360| 77 69 6e 67 20 74 68 69 | 73 20 64 6f 63 75 6d 65 |wing thi|s docume|
|00000370| 6e 74 20 77 69 74 68 20 | 76 69 20 6f 6e 20 61 6e |nt with |vi on an|
|00000380| 20 38 30 2d 63 6f 6c 75 | 6d 6e 73 20 73 63 72 65 | 80-colu|mns scre|
|00000390| 65 6e 2c 20 20 20 25 0a | 25 20 64 6f 20 61 20 27 |en, %.|% do a '|
|000003a0| 3a 73 65 20 6e 6f 6e 75 | 6d 62 65 72 27 20 66 69 |:se nonu|mber' fi|
|000003b0| 72 73 74 2e 20 20 20 20 | 20 20 20 20 20 20 20 20 |rst. | |
|000003c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000003d0| 20 20 20 20 20 20 20 20 | 25 0a 25 25 25 25 25 25 | |%.%%%%%%|
|000003e0| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|000003f0| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|00000400| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|00000410| 25 25 25 25 25 25 25 25 | 25 25 25 0a 0a 25 25 25 |%%%%%%%%|%%%..%%%|
|00000420| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|00000430| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|00000440| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|00000450| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 0a 25 |%%%%%%%%|%%%%%%.%|
|00000460| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|00000470| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|00000480| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|00000490| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|000004a0| 0a 25 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |.% | |
|000004b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000004c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000004d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000004e0| 20 25 0a 25 20 20 20 20 | 20 20 20 20 20 20 20 20 | %.% | |
|000004f0| 20 20 20 53 20 54 20 41 | 20 52 20 54 20 20 20 4f | S T A| R T O|
|00000500| 20 46 20 20 20 43 20 48 | 20 41 20 50 20 54 20 45 | F C H| A P T E|
|00000510| 20 52 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | R | |
|00000520| 20 20 20 25 0a 25 20 20 | 20 20 20 20 20 20 20 20 | %.% | |
|00000530| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000540| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000550| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000560| 20 20 20 20 20 25 0a 25 | 25 25 25 25 25 25 25 25 | %.%|%%%%%%%%|
|00000570| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|00000580| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|00000590| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|000005a0| 25 25 25 25 25 25 25 25 | 0a 25 25 25 25 25 25 25 |%%%%%%%%|.%%%%%%%|
|000005b0| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|000005c0| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|000005d0| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|000005e0| 25 25 25 25 25 25 25 25 | 25 25 0a 5c 63 68 61 70 |%%%%%%%%|%%.\chap|
|000005f0| 74 65 72 7b 56 61 72 69 | 6f 75 73 20 4e 65 74 77 |ter{Vari|ous Netw|
|00000600| 6f 72 6b 20 41 70 70 6c | 69 63 61 74 69 6f 6e 73 |ork Appl|ications|
|00000610| 7d 0a 5c 6c 61 62 65 6c | 7b 61 70 70 6c 7d 0a 0a |}.\label|{appl}..|
|00000620| 41 66 74 65 72 20 73 75 | 63 63 65 73 73 66 75 6c |After su|ccessful|
|00000630| 6c 79 20 73 65 74 74 69 | 6e 67 20 75 70 20 49 50 |ly setti|ng up IP|
|00000640| 20 61 6e 64 20 74 68 65 | 20 72 65 73 6f 6c 76 65 | and the| resolve|
|00000650| 72 2c 20 79 6f 75 20 68 | 61 76 65 20 74 6f 20 74 |r, you h|ave to t|
|00000660| 75 72 6e 20 74 6f 0a 74 | 68 65 20 73 65 72 76 69 |urn to.t|he servi|
|00000670| 63 65 73 20 79 6f 75 20 | 77 61 6e 74 20 74 6f 20 |ces you |want to |
|00000680| 70 72 6f 76 69 64 65 20 | 6f 76 65 72 20 74 68 65 |provide |over the|
|00000690| 20 6e 65 74 77 6f 72 6b | 2e 20 54 68 69 73 20 63 | network|. This c|
|000006a0| 68 61 70 74 65 72 20 63 | 6f 76 65 72 73 0a 74 68 |hapter c|overs.th|
|000006b0| 65 20 63 6f 6e 66 69 67 | 75 72 61 74 69 6f 6e 20 |e config|uration |
|000006c0| 6f 66 20 61 20 66 65 77 | 20 73 69 6d 70 6c 65 20 |of a few| simple |
|000006d0| 6e 65 74 77 6f 72 6b 20 | 61 70 70 6c 69 63 61 74 |network |applicat|
|000006e0| 69 6f 6e 73 2c 20 69 6e | 63 6c 75 64 69 6e 67 20 |ions, in|cluding |
|000006f0| 74 68 65 0a 5c 70 72 6f | 67 7b 69 6e 65 74 64 7d |the.\pro|g{inetd}|
|00000700| 20 73 65 72 76 65 72 2c | 20 61 6e 64 20 74 68 65 | server,| and the|
|00000710| 20 70 72 6f 67 72 61 6d | 73 20 66 72 6f 6d 20 74 | program|s from t|
|00000720| 68 65 20 5c 70 72 6f 67 | 7b 72 6c 6f 67 69 6e 7d |he \prog|{rlogin}|
|00000730| 20 66 61 6d 69 6c 79 2e | 0a 54 68 65 20 52 65 6d | family.|.The Rem|
|00000740| 6f 74 65 20 50 72 6f 63 | 65 64 75 72 65 20 43 61 |ote Proc|edure Ca|
|00000750| 6c 6c 20 69 6e 74 65 72 | 66 61 63 65 20 74 68 61 |ll inter|face tha|
|00000760| 74 20 73 65 72 76 69 63 | 65 73 20 6c 69 6b 65 20 |t servic|es like |
|00000770| 74 68 65 20 4e 65 74 77 | 6f 72 6b 20 46 69 6c 65 |the Netw|ork File|
|00000780| 0a 53 79 73 74 65 6d 20 | 28 4e 46 53 29 20 61 6e |.System |(NFS) an|
|00000790| 64 20 74 68 65 20 4e 65 | 74 77 6f 72 6b 20 49 6e |d the Ne|twork In|
|000007a0| 66 6f 72 6d 61 74 69 6f | 6e 20 53 79 73 74 65 6d |formatio|n System|
|000007b0| 20 28 4e 49 53 29 20 61 | 72 65 20 62 61 73 65 64 | (NIS) a|re based|
|000007c0| 20 75 70 6f 6e 0a 77 69 | 6c 6c 20 62 65 20 64 65 | upon.wi|ll be de|
|000007d0| 61 6c 74 20 77 69 74 68 | 20 62 72 69 65 66 6c 79 |alt with| briefly|
|000007e0| 2c 20 74 6f 6f 2e 20 54 | 68 65 20 63 6f 6e 66 69 |, too. T|he confi|
|000007f0| 67 75 72 61 74 69 6f 6e | 20 6f 66 20 4e 46 53 20 |guration| of NFS |
|00000800| 61 6e 64 20 4e 49 53 2c | 0a 68 6f 77 65 76 65 72 |and NIS,|.however|
|00000810| 2c 20 74 61 6b 65 73 20 | 75 70 20 6d 6f 72 65 20 |, takes |up more |
|00000820| 72 6f 6f 6d 2c 20 77 69 | 6c 6c 20 62 65 20 64 65 |room, wi|ll be de|
|00000830| 73 63 72 69 62 65 64 20 | 69 6e 20 73 65 70 61 72 |scribed |in separ|
|00000840| 61 74 65 20 63 68 61 70 | 74 65 72 73 2e 0a 54 68 |ate chap|ters..Th|
|00000850| 69 73 20 61 70 70 6c 69 | 65 73 20 74 6f 20 65 6c |is appli|es to el|
|00000860| 65 63 74 72 6f 6e 69 63 | 20 6d 61 69 6c 20 61 6e |ectronic| mail an|
|00000870| 64 20 6e 65 74 6e 65 77 | 73 20 61 73 20 77 65 6c |d netnew|s as wel|
|00000880| 6c 2e 0a 0a 0a 4f 66 20 | 63 6f 75 72 73 65 2c 20 |l....Of |course, |
|00000890| 77 65 20 63 61 6e 27 74 | 20 63 6f 76 65 72 20 61 |we can't| cover a|
|000008a0| 6c 6c 20 6e 65 74 77 6f | 72 6b 20 61 70 70 6c 69 |ll netwo|rk appli|
|000008b0| 63 61 74 69 6f 6e 73 20 | 69 6e 20 74 68 69 73 20 |cations |in this |
|000008c0| 62 6f 6f 6b 2e 20 49 66 | 20 79 6f 75 0a 77 61 6e |book. If| you.wan|
|000008d0| 74 20 74 6f 20 69 6e 73 | 74 61 6c 6c 20 6f 6e 65 |t to ins|tall one|
|000008e0| 20 74 68 61 74 27 73 20 | 6e 6f 74 20 64 69 73 63 | that's |not disc|
|000008f0| 75 73 73 65 64 20 68 65 | 72 65 2c 20 6c 69 6b 65 |ussed he|re, like|
|00000900| 20 5c 70 72 6f 67 7b 74 | 61 6c 6b 7d 2c 0a 5c 70 | \prog{t|alk},.\p|
|00000910| 72 6f 67 7b 67 6f 70 68 | 65 72 7d 2c 20 6f 72 20 |rog{goph|er}, or |
|00000920| 5c 70 72 6f 67 7b 58 6d | 6f 73 61 69 63 7d 20 70 |\prog{Xm|osaic} p|
|00000930| 6c 65 61 73 65 20 72 65 | 66 65 72 20 74 6f 20 69 |lease re|fer to i|
|00000940| 74 73 20 6d 61 6e 75 61 | 6c 20 70 61 67 65 73 20 |ts manua|l pages |
|00000950| 66 6f 72 0a 64 65 74 61 | 69 6c 73 2e 0a 0a 0a 5c |for.deta|ils....\|
|00000960| 73 65 63 74 69 6f 6e 7b | 54 68 65 20 5c 70 72 6f |section{|The \pro|
|00000970| 67 7b 69 6e 65 74 64 7d | 20 53 75 70 65 72 2d 53 |g{inetd}| Super-S|
|00000980| 65 72 76 65 72 7d 0a 25 | 25 25 25 25 25 25 25 25 |erver}.%|%%%%%%%%|
|00000990| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|000009a0| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|000009b0| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|000009c0| 25 25 25 25 25 25 25 25 | 0a 5c 6c 61 62 65 6c 7b |%%%%%%%%|.\label{|
|000009d0| 61 70 70 6c 2e 69 6e 65 | 74 64 7d 0a 5c 69 6e 64 |appl.ine|td}.\ind|
|000009e0| 65 78 7b 69 6e 65 74 64 | 40 5c 70 72 6f 67 7b 69 |ex{inetd|@\prog{i|
|000009f0| 6e 65 74 64 7d 7d 0a 5c | 69 6e 64 65 78 7b 73 65 |netd}}.\|index{se|
|00000a00| 72 76 69 63 65 73 21 73 | 65 74 74 69 6e 67 20 75 |rvices!s|etting u|
|00000a10| 70 7d 0a 5c 69 6e 64 65 | 78 7b 73 65 72 76 65 72 |p}.\inde|x{server|
|00000a20| 21 69 6e 65 74 64 40 5c | 70 72 6f 67 7b 69 6e 65 |!inetd@\|prog{ine|
|00000a30| 74 64 7d 7c 28 7d 0a 5c | 69 6e 64 65 78 7b 63 6f |td}|(}.\|index{co|
|00000a40| 6e 66 69 67 75 72 69 6e | 67 21 6e 65 74 77 6f 72 |nfigurin|g!networ|
|00000a50| 6b 20 73 65 72 76 69 63 | 65 73 7d 0a 0a 46 72 65 |k servic|es}..Fre|
|00000a60| 71 75 65 6e 74 6c 79 2c | 20 73 65 72 76 69 63 65 |quently,| service|
|00000a70| 73 20 61 72 65 20 70 65 | 72 66 6f 72 6d 65 64 20 |s are pe|rformed |
|00000a80| 62 79 20 73 6f 2d 63 61 | 6c 6c 65 64 20 5c 65 6d |by so-ca|lled \em|
|00000a90| 70 68 7b 64 61 65 6d 6f | 6e 73 7d 2e 20 41 20 64 |ph{daemo|ns}. A d|
|00000aa0| 61 65 6d 6f 6e 0a 69 73 | 20 61 20 70 72 6f 67 72 |aemon.is| a progr|
|00000ab0| 61 6d 20 74 68 61 74 20 | 6f 70 65 6e 73 20 61 20 |am that |opens a |
|00000ac0| 63 65 72 74 61 69 6e 20 | 70 6f 72 74 2c 20 61 6e |certain |port, an|
|00000ad0| 64 20 77 61 69 74 73 20 | 66 6f 72 20 69 6e 63 6f |d waits |for inco|
|00000ae0| 6d 69 6e 67 0a 63 6f 6e | 6e 65 63 74 69 6f 6e 73 |ming.con|nections|
|00000af0| 2e 20 20 49 66 20 6f 6e | 65 20 6f 63 63 75 72 73 |. If on|e occurs|
|00000b00| 2c 20 69 74 20 63 72 65 | 61 74 65 73 20 61 20 63 |, it cre|ates a c|
|00000b10| 68 69 6c 64 20 70 72 6f | 63 65 73 73 20 77 68 69 |hild pro|cess whi|
|00000b20| 63 68 20 61 63 63 65 70 | 74 73 0a 74 68 65 20 63 |ch accep|ts.the c|
|00000b30| 6f 6e 6e 65 63 74 69 6f | 6e 2c 20 77 68 69 6c 65 |onnectio|n, while|
|00000b40| 20 74 68 65 20 70 61 72 | 65 6e 74 20 63 6f 6e 74 | the par|ent cont|
|00000b50| 69 6e 75 65 73 20 74 6f | 20 6c 69 73 74 65 6e 20 |inues to| listen |
|00000b60| 66 6f 72 20 66 75 72 74 | 68 65 72 0a 72 65 71 75 |for furt|her.requ|
|00000b70| 65 73 74 73 2e 20 20 54 | 68 69 73 20 63 6f 6e 63 |ests. T|his conc|
|00000b80| 65 70 74 20 68 61 73 20 | 74 68 65 20 64 72 61 77 |ept has |the draw|
|00000b90| 62 61 63 6b 20 74 68 61 | 74 20 66 6f 72 20 65 76 |back tha|t for ev|
|00000ba0| 65 72 79 20 73 65 72 76 | 69 63 65 20 6f 66 66 65 |ery serv|ice offe|
|00000bb0| 72 65 64 2c 0a 61 20 64 | 61 65 6d 6f 6e 20 68 61 |red,.a d|aemon ha|
|00000bc0| 73 20 74 6f 20 72 75 6e | 20 74 68 61 74 20 6c 69 |s to run| that li|
|00000bd0| 73 74 65 6e 73 20 6f 6e | 20 74 68 65 20 70 6f 72 |stens on| the por|
|00000be0| 74 20 66 6f 72 20 61 20 | 63 6f 6e 6e 65 63 74 69 |t for a |connecti|
|00000bf0| 6f 6e 20 74 6f 20 6f 63 | 63 75 72 2c 0a 77 68 69 |on to oc|cur,.whi|
|00000c00| 63 68 20 67 65 6e 65 72 | 61 6c 6c 79 20 6d 65 61 |ch gener|ally mea|
|00000c10| 6e 73 20 61 20 77 61 73 | 74 65 20 6f 66 20 73 79 |ns a was|te of sy|
|00000c20| 73 74 65 6d 20 72 65 73 | 6f 75 72 63 65 73 20 6c |stem res|ources l|
|00000c30| 69 6b 65 20 73 77 61 70 | 20 73 70 61 63 65 2e 0a |ike swap| space..|
|00000c40| 0a 0a 54 68 75 73 2c 20 | 61 6c 6d 6f 73 74 20 61 |..Thus, |almost a|
|00000c50| 6c 6c 20 5c 75 6e 69 78 | 7b 7d 20 69 6e 73 74 61 |ll \unix|{} insta|
|00000c60| 6c 6c 61 74 69 6f 6e 73 | 20 72 75 6e 20 61 20 60 |llations| run a `|
|00000c70| 60 73 75 70 65 72 2d 73 | 65 72 76 65 72 27 27 20 |`super-s|erver'' |
|00000c80| 74 68 61 74 0a 63 72 65 | 61 74 65 73 20 73 6f 63 |that.cre|ates soc|
|00000c90| 6b 65 74 73 20 66 6f 72 | 20 61 20 6e 75 6d 62 65 |kets for| a numbe|
|00000ca0| 72 20 6f 66 20 73 65 72 | 76 69 63 65 73 2c 20 61 |r of ser|vices, a|
|00000cb0| 6e 64 20 6c 69 73 74 65 | 6e 73 20 6f 6e 20 61 6c |nd liste|ns on al|
|00000cc0| 6c 20 6f 66 20 74 68 65 | 6d 0a 73 69 6d 75 6c 74 |l of the|m.simult|
|00000cd0| 61 6e 65 6f 75 73 6c 79 | 20 75 73 69 6e 67 20 74 |aneously| using t|
|00000ce0| 68 65 20 5c 66 75 6e 63 | 7b 73 65 6c 65 63 74 28 |he \func|{select(|
|00000cf0| 32 29 7d 20 73 79 73 74 | 65 6d 20 63 61 6c 6c 2e |2)} syst|em call.|
|00000d00| 20 57 68 65 6e 20 61 20 | 72 65 6d 6f 74 65 0a 68 | When a |remote.h|
|00000d10| 6f 73 74 20 72 65 71 75 | 65 73 74 73 20 6f 6e 65 |ost requ|ests one|
|00000d20| 20 6f 66 20 74 68 65 20 | 73 65 72 76 69 63 65 73 | of the |services|
|00000d30| 2c 20 74 68 65 20 73 75 | 70 65 72 2d 73 65 72 76 |, the su|per-serv|
|00000d40| 65 72 20 6e 6f 74 69 63 | 65 73 20 74 68 69 73 20 |er notic|es this |
|00000d50| 61 6e 64 0a 73 70 61 77 | 6e 73 20 74 68 65 20 73 |and.spaw|ns the s|
|00000d60| 65 72 76 65 72 20 73 70 | 65 63 69 66 69 65 64 20 |erver sp|ecified |
|00000d70| 66 6f 72 20 74 68 69 73 | 20 70 6f 72 74 2e 0a 0a |for this| port...|
|00000d80| 0a 5c 69 6e 64 65 78 7b | 69 6e 65 74 64 2e 63 6f |.\index{|inetd.co|
|00000d90| 6e 66 40 5c 66 69 6c 65 | 7b 69 6e 65 74 64 2e 63 |nf@\file|{inetd.c|
|00000da0| 6f 6e 66 7d 7c 28 7d 0a | 5c 69 6e 64 65 78 7b 63 |onf}|(}.|\index{c|
|00000db0| 68 61 72 67 65 6e 40 5c | 70 72 6f 67 7b 63 68 61 |hargen@\|prog{cha|
|00000dc0| 72 67 65 6e 7d 7d 0a 5c | 69 6e 64 65 78 7b 64 61 |rgen}}.\|index{da|
|00000dd0| 79 74 69 6d 65 40 5c 70 | 72 6f 67 7b 64 61 79 74 |ytime@\p|rog{dayt|
|00000de0| 69 6d 65 7d 7d 0a 54 68 | 65 20 73 75 70 65 72 2d |ime}}.Th|e super-|
|00000df0| 73 65 72 76 65 72 20 63 | 6f 6d 6d 6f 6e 6c 79 20 |server c|ommonly |
|00000e00| 75 73 65 64 20 69 73 20 | 5c 70 72 6f 67 7b 69 6e |used is |\prog{in|
|00000e10| 65 74 64 7d 2c 20 74 68 | 65 20 49 6e 74 65 72 6e |etd}, th|e Intern|
|00000e20| 65 74 20 44 61 65 6d 6f | 6e 2e 0a 49 74 20 69 73 |et Daemo|n..It is|
|00000e30| 20 73 74 61 72 74 65 64 | 20 61 74 20 73 79 73 74 | started| at syst|
|00000e40| 65 6d 20 62 6f 6f 74 20 | 74 69 6d 65 2c 20 61 6e |em boot |time, an|
|00000e50| 64 20 74 61 6b 65 73 20 | 74 68 65 20 6c 69 73 74 |d takes |the list|
|00000e60| 20 6f 66 20 73 65 72 76 | 69 63 65 73 20 69 74 0a | of serv|ices it.|
|00000e70| 69 73 20 74 6f 20 6d 61 | 6e 61 67 65 20 66 72 6f |is to ma|nage fro|
|00000e80| 6d 20 61 20 73 74 61 72 | 74 75 70 20 66 69 6c 65 |m a star|tup file|
|00000e90| 20 6e 61 6d 65 64 20 5c | 66 69 6c 65 7b 2f 65 74 | named \|file{/et|
|00000ea0| 63 2f 69 6e 65 74 64 2e | 63 6f 6e 66 7d 2e 20 20 |c/inetd.|conf}. |
|00000eb0| 49 6e 0a 61 64 64 69 74 | 69 6f 6e 20 74 6f 20 74 |In.addit|ion to t|
|00000ec0| 68 6f 73 65 20 73 65 72 | 76 65 72 73 20 69 6e 76 |hose ser|vers inv|
|00000ed0| 6f 6b 65 64 2c 20 74 68 | 65 72 65 20 61 72 65 20 |oked, th|ere are |
|00000ee0| 61 20 6e 75 6d 62 65 72 | 20 6f 66 20 74 72 69 76 |a number| of triv|
|00000ef0| 69 61 6c 0a 73 65 72 76 | 69 63 65 73 20 77 68 69 |ial.serv|ices whi|
|00000f00| 63 68 20 61 72 65 20 70 | 65 72 66 6f 72 6d 65 64 |ch are p|erformed|
|00000f10| 20 62 79 20 5c 70 72 6f | 67 7b 69 6e 65 74 64 7d | by \pro|g{inetd}|
|00000f20| 20 69 74 73 65 6c 66 20 | 63 61 6c 6c 65 64 20 5c | itself |called \|
|00000f30| 65 6d 70 68 7b 69 6e 74 | 65 72 6e 61 6c 0a 73 65 |emph{int|ernal.se|
|00000f40| 72 76 69 63 65 73 7d 2e | 20 54 68 65 79 20 69 6e |rvices}.| They in|
|00000f50| 63 6c 75 64 65 20 5c 70 | 72 6f 67 7b 63 68 61 72 |clude \p|rog{char|
|00000f60| 67 65 6e 7d 20 77 68 69 | 63 68 20 73 69 6d 70 6c |gen} whi|ch simpl|
|00000f70| 79 20 67 65 6e 65 72 61 | 74 65 73 20 61 20 73 74 |y genera|tes a st|
|00000f80| 72 69 6e 67 20 6f 66 0a | 63 68 61 72 61 63 74 65 |ring of.|characte|
|00000f90| 72 73 2c 20 61 6e 64 20 | 5c 70 72 6f 67 7b 64 61 |rs, and |\prog{da|
|00000fa0| 79 74 69 6d 65 7d 20 77 | 68 69 63 68 20 72 65 74 |ytime} w|hich ret|
|00000fb0| 75 72 6e 73 20 74 68 65 | 20 73 79 73 74 65 6d 27 |urns the| system'|
|00000fc0| 73 20 69 64 65 61 20 6f | 66 20 74 68 65 20 74 69 |s idea o|f the ti|
|00000fd0| 6d 65 0a 6f 66 20 64 61 | 79 2e 0a 0a 0a 41 6e 20 |me.of da|y....An |
|00000fe0| 65 6e 74 72 79 20 69 6e | 20 74 68 69 73 20 66 69 |entry in| this fi|
|00000ff0| 6c 65 20 63 6f 6e 73 69 | 73 74 73 20 6f 66 20 61 |le consi|sts of a|
|00001000| 20 73 69 6e 67 6c 65 20 | 6c 69 6e 65 20 6d 61 64 | single |line mad|
|00001010| 65 20 75 70 20 6f 66 20 | 74 68 65 0a 66 6f 6c 6c |e up of |the.foll|
|00001020| 6f 77 69 6e 67 20 66 69 | 65 6c 64 73 3a 0a 0a 0a |owing fi|elds:...|
|00001030| 5c 62 65 67 69 6e 7b 74 | 73 63 72 65 65 6e 7d 0a |\begin{t|screen}.|
|00001040| 5c 76 61 72 7b 73 65 72 | 76 69 63 65 20 74 79 70 |\var{ser|vice typ|
|00001050| 65 20 70 72 6f 74 6f 63 | 6f 6c 20 77 61 69 74 20 |e protoc|ol wait |
|00001060| 75 73 65 72 20 73 65 72 | 76 65 72 20 63 6d 64 6c |user ser|ver cmdl|
|00001070| 69 6e 65 7d 0a 5c 65 6e | 64 7b 74 73 63 72 65 65 |ine}.\en|d{tscree|
|00001080| 6e 7d 0a 0a 0a 5c 6e 6f | 69 6e 64 65 6e 74 0a 54 |n}...\no|indent.T|
|00001090| 68 65 20 6d 65 61 6e 69 | 6e 67 20 6f 66 20 65 61 |he meani|ng of ea|
|000010a0| 63 68 20 66 69 65 6c 64 | 20 69 73 20 61 73 20 66 |ch field| is as f|
|000010b0| 6f 6c 6c 6f 77 73 3a 0a | 0a 5c 62 65 67 69 6e 7b |ollows:.|.\begin{|
|000010c0| 64 69 73 70 69 74 65 6d | 73 7d 0a 5c 64 69 74 65 |dispitem|s}.\dite|
|000010d0| 6d 5b 5c 76 61 72 7b 73 | 65 72 76 69 63 65 7d 5d |m[\var{s|ervice}]|
|000010e0| 0a 20 20 20 20 20 20 20 | 20 5c 69 6e 64 65 78 7b |. | \index{|
|000010f0| 73 65 72 76 69 63 65 73 | 40 5c 66 69 6c 65 7b 73 |services|@\file{s|
|00001100| 65 72 76 69 63 65 73 7d | 7d 0a 20 20 20 20 20 20 |ervices}|}. |
|00001110| 20 20 67 69 76 65 73 20 | 74 68 65 20 73 65 72 76 | gives |the serv|
|00001120| 69 63 65 20 6e 61 6d 65 | 2e 20 54 68 65 20 73 65 |ice name|. The se|
|00001130| 72 76 69 63 65 20 6e 61 | 6d 65 20 68 61 73 20 74 |rvice na|me has t|
|00001140| 6f 20 62 65 20 74 72 61 | 6e 73 6c 61 74 65 64 20 |o be tra|nslated |
|00001150| 74 6f 0a 20 20 20 20 20 | 20 20 20 61 20 70 6f 72 |to. | a por|
|00001160| 74 20 6e 75 6d 62 65 72 | 20 62 79 20 6c 6f 6f 6b |t number| by look|
|00001170| 69 6e 67 20 69 74 20 75 | 70 20 69 6e 20 74 68 65 |ing it u|p in the|
|00001180| 20 5c 66 69 6c 65 7b 2f | 65 74 63 2f 73 65 72 76 | \file{/|etc/serv|
|00001190| 69 63 65 73 7d 20 66 69 | 6c 65 2e 0a 20 20 20 20 |ices} fi|le.. |
|000011a0| 20 20 20 20 54 68 69 73 | 20 66 69 6c 65 20 77 69 | This| file wi|
|000011b0| 6c 6c 20 62 65 20 64 65 | 73 63 72 69 62 65 64 20 |ll be de|scribed |
|000011c0| 69 6e 20 73 65 63 74 69 | 6f 6e 20 5c 72 65 66 7b |in secti|on \ref{|
|000011d0| 61 70 70 6c 2e 73 65 72 | 76 69 63 65 73 7d 0a 20 |appl.ser|vices}. |
|000011e0| 20 20 20 20 20 20 20 62 | 65 6c 6f 77 2e 0a 0a 5c | b|elow...\|
|000011f0| 64 69 74 65 6d 5b 5c 76 | 61 72 7b 74 79 70 65 7d |ditem[\v|ar{type}|
|00001200| 5d 0a 20 20 20 20 20 20 | 20 20 73 70 65 63 69 66 |]. | specif|
|00001210| 69 65 73 20 61 20 73 6f | 63 6b 65 74 20 74 79 70 |ies a so|cket typ|
|00001220| 65 2c 20 65 69 74 68 65 | 72 20 5c 6b 65 79 77 6f |e, eithe|r \keywo|
|00001230| 72 64 7b 73 74 72 65 61 | 6d 7d 20 28 66 6f 72 0a |rd{strea|m} (for.|
|00001240| 20 20 20 20 20 20 20 20 | 63 6f 6e 6e 65 63 74 69 | |connecti|
|00001250| 6f 6e 2d 6f 72 69 65 6e | 74 65 64 20 70 72 6f 74 |on-orien|ted prot|
|00001260| 6f 63 6f 6c 73 29 20 6f | 72 20 5c 6b 65 79 77 6f |ocols) o|r \keywo|
|00001270| 72 64 7b 64 67 72 61 6d | 7d 20 28 66 6f 72 20 64 |rd{dgram|} (for d|
|00001280| 61 74 61 67 72 61 6d 0a | 20 20 20 20 20 20 20 20 |atagram.| |
|00001290| 70 72 6f 74 6f 63 6f 6c | 73 29 2e 20 20 54 43 50 |protocol|s). TCP|
|000012a0| 2d 62 61 73 65 64 20 73 | 65 72 76 69 63 65 73 20 |-based s|ervices |
|000012b0| 73 68 6f 75 6c 64 20 74 | 68 65 72 65 66 6f 72 65 |should t|herefore|
|000012c0| 20 61 6c 77 61 79 73 20 | 75 73 65 0a 20 20 20 20 | always |use. |
|000012d0| 20 20 20 20 5c 6b 65 79 | 77 6f 72 64 7b 73 74 72 | \key|word{str|
|000012e0| 65 61 6d 7d 2c 20 77 68 | 69 6c 65 20 55 44 50 2d |eam}, wh|ile UDP-|
|000012f0| 62 61 73 65 64 20 73 65 | 72 76 69 63 65 73 20 73 |based se|rvices s|
|00001300| 68 6f 75 6c 64 20 61 6c | 77 61 79 73 20 75 73 65 |hould al|ways use|
|00001310| 0a 20 20 20 20 20 20 20 | 20 5c 6b 65 79 77 6f 72 |. | \keywor|
|00001320| 64 7b 64 67 72 61 6d 7d | 2e 0a 0a 5c 64 69 74 65 |d{dgram}|...\dite|
|00001330| 6d 5b 5c 76 61 72 7b 70 | 72 6f 74 6f 63 6f 6c 7d |m[\var{p|rotocol}|
|00001340| 5d 0a 20 20 20 20 20 20 | 20 20 5c 69 6e 64 65 78 |]. | \index|
|00001350| 7b 70 72 6f 74 6f 63 6f | 6c 73 40 5c 66 69 6c 65 |{protoco|ls@\file|
|00001360| 7b 70 72 6f 74 6f 63 6f | 6c 73 7d 7d 0a 20 20 20 |{protoco|ls}}. |
|00001370| 20 20 20 20 20 6e 61 6d | 65 73 20 74 68 65 20 74 | nam|es the t|
|00001380| 72 61 6e 73 70 6f 72 74 | 20 70 72 6f 74 6f 63 6f |ransport| protoco|
|00001390| 6c 20 75 73 65 64 20 62 | 79 20 74 68 65 20 73 65 |l used b|y the se|
|000013a0| 72 76 69 63 65 2e 20 54 | 68 69 73 20 6d 75 73 74 |rvice. T|his must|
|000013b0| 20 62 65 20 61 0a 20 20 | 20 20 20 20 20 20 76 61 | be a. | va|
|000013c0| 6c 69 64 20 70 72 6f 74 | 6f 63 6f 6c 20 6e 61 6d |lid prot|ocol nam|
|000013d0| 65 20 66 6f 75 6e 64 20 | 69 6e 20 74 68 65 20 5c |e found |in the \|
|000013e0| 66 69 6c 65 7b 70 72 6f | 74 6f 63 6f 6c 73 7d 20 |file{pro|tocols} |
|000013f0| 66 69 6c 65 2c 20 61 6c | 73 6f 0a 20 20 20 20 20 |file, al|so. |
|00001400| 20 20 20 65 78 70 6c 61 | 69 6e 65 64 20 62 65 6c | expla|ined bel|
|00001410| 6f 77 2e 0a 0a 5c 64 69 | 74 65 6d 5b 5c 76 61 72 |ow...\di|tem[\var|
|00001420| 7b 77 61 69 74 7d 5d 0a | 20 20 20 20 20 20 20 20 |{wait}].| |
|00001430| 54 68 69 73 20 6f 70 74 | 69 6f 6e 20 61 70 70 6c |This opt|ion appl|
|00001440| 69 65 73 20 6f 6e 6c 79 | 20 74 6f 20 5c 6b 65 79 |ies only| to \key|
|00001450| 77 6f 72 64 7b 64 67 72 | 61 6d 7d 20 73 6f 63 6b |word{dgr|am} sock|
|00001460| 65 74 73 2e 20 49 74 20 | 6d 61 79 0a 20 20 20 20 |ets. It |may. |
|00001470| 20 20 20 20 62 65 20 65 | 69 74 68 65 72 20 5c 6b | be e|ither \k|
|00001480| 65 79 77 6f 72 64 7b 77 | 61 69 74 7d 20 6f 72 20 |eyword{w|ait} or |
|00001490| 5c 6b 65 79 77 6f 72 64 | 7b 6e 6f 77 61 69 74 7d |\keyword|{nowait}|
|000014a0| 2e 20 49 66 20 5c 6b 65 | 79 77 6f 72 64 7b 77 61 |. If \ke|yword{wa|
|000014b0| 69 74 7d 20 69 73 0a 20 | 20 20 20 20 20 20 20 73 |it} is. | s|
|000014c0| 70 65 63 69 66 69 65 64 | 2c 20 5c 70 72 6f 67 7b |pecified|, \prog{|
|000014d0| 69 6e 65 74 64 7d 20 77 | 69 6c 6c 20 6f 6e 6c 79 |inetd} w|ill only|
|000014e0| 20 65 78 65 63 75 74 65 | 20 6f 6e 65 20 73 65 72 | execute| one ser|
|000014f0| 76 65 72 20 66 6f 72 0a | 20 20 20 20 20 20 20 20 |ver for.| |
|00001500| 74 68 65 20 73 70 65 63 | 69 66 69 65 64 20 70 6f |the spec|ified po|
|00001510| 72 74 20 61 74 20 61 6e | 79 20 74 69 6d 65 2e 20 |rt at an|y time. |
|00001520| 4f 74 68 65 72 77 69 73 | 65 2c 20 69 74 20 77 69 |Otherwis|e, it wi|
|00001530| 6c 6c 20 69 6d 6d 65 64 | 69 61 74 65 6c 79 0a 20 |ll immed|iately. |
|00001540| 20 20 20 20 20 20 20 63 | 6f 6e 74 69 6e 75 65 20 | c|ontinue |
|00001550| 74 6f 20 6c 69 73 74 65 | 6e 20 6f 6e 20 74 68 65 |to liste|n on the|
|00001560| 20 70 6f 72 74 20 61 66 | 74 65 72 20 65 78 65 63 | port af|ter exec|
|00001570| 75 74 69 6e 67 20 74 68 | 65 20 73 65 72 76 65 72 |uting th|e server|
|00001580| 2e 0a 0a 20 20 20 20 20 | 20 20 20 54 68 69 73 20 |... | This |
|00001590| 69 73 20 75 73 65 66 75 | 6c 20 66 6f 72 20 60 60 |is usefu|l for ``|
|000015a0| 73 69 6e 67 6c 65 2d 74 | 68 72 65 61 64 65 64 27 |single-t|hreaded'|
|000015b0| 27 20 73 65 72 76 65 72 | 73 20 74 68 61 74 20 72 |' server|s that r|
|000015c0| 65 61 64 20 61 6c 6c 0a | 20 20 20 20 20 20 20 20 |ead all.| |
|000015d0| 69 6e 63 6f 6d 69 6e 67 | 20 64 61 74 61 67 72 61 |incoming| datagra|
|000015e0| 6d 73 20 75 6e 74 69 6c | 20 6e 6f 20 6d 6f 72 65 |ms until| no more|
|000015f0| 20 61 72 72 69 76 65 2c | 20 61 6e 64 20 74 68 65 | arrive,| and the|
|00001600| 6e 20 65 78 69 74 2e 20 | 4d 6f 73 74 20 52 50 43 |n exit. |Most RPC|
|00001610| 0a 20 20 20 20 20 20 20 | 20 73 65 72 76 65 72 73 |. | servers|
|00001620| 20 61 72 65 20 6f 66 20 | 74 68 69 73 20 74 79 70 | are of |this typ|
|00001630| 65 20 61 6e 64 20 73 68 | 6f 75 6c 64 20 74 68 65 |e and sh|ould the|
|00001640| 72 65 66 6f 72 65 20 73 | 70 65 63 69 66 79 0a 20 |refore s|pecify. |
|00001650| 20 20 20 20 20 20 20 5c | 6b 65 79 77 6f 72 64 7b | \|keyword{|
|00001660| 77 61 69 74 7d 2e 20 20 | 54 68 65 20 6f 70 70 6f |wait}. |The oppo|
|00001670| 73 69 74 65 20 74 79 70 | 65 2c 20 60 60 6d 75 6c |site typ|e, ``mul|
|00001680| 74 69 2d 74 68 72 65 61 | 64 65 64 27 27 20 73 65 |ti-threa|ded'' se|
|00001690| 72 76 65 72 73 2c 0a 20 | 20 20 20 20 20 20 20 61 |rvers,. | a|
|000016a0| 6c 6c 6f 77 20 61 6e 20 | 75 6e 6c 69 6d 69 74 65 |llow an |unlimite|
|000016b0| 64 20 6e 75 6d 62 65 72 | 20 6f 66 20 69 6e 73 74 |d number| of inst|
|000016c0| 61 6e 63 65 73 20 74 6f | 20 72 75 6e 20 63 6f 6e |ances to| run con|
|000016d0| 63 75 72 72 65 6e 74 6c | 79 3b 20 74 68 69 73 0a |currentl|y; this.|
|000016e0| 20 20 20 20 20 20 20 20 | 69 73 20 6f 6e 6c 79 20 | |is only |
|000016f0| 72 61 72 65 6c 79 20 75 | 73 65 64 2e 20 54 68 65 |rarely u|sed. The|
|00001700| 73 65 20 73 65 72 76 65 | 72 73 20 73 68 6f 75 6c |se serve|rs shoul|
|00001710| 64 20 73 70 65 63 69 66 | 79 0a 20 20 20 20 20 20 |d specif|y. |
|00001720| 20 20 5c 6b 65 79 77 6f | 72 64 7b 6e 6f 77 61 69 | \keywo|rd{nowai|
|00001730| 74 7d 2e 0a 0a 20 20 20 | 20 20 20 20 20 5c 6b 65 |t}... | \ke|
|00001740| 79 77 6f 72 64 7b 73 74 | 72 65 61 6d 7d 20 73 6f |yword{st|ream} so|
|00001750| 63 6b 65 74 73 20 73 68 | 6f 75 6c 64 20 61 6c 77 |ckets sh|ould alw|
|00001760| 61 79 73 20 75 73 65 20 | 5c 6b 65 79 77 6f 72 64 |ays use |\keyword|
|00001770| 7b 6e 6f 77 61 69 74 7d | 2e 0a 0a 5c 64 69 74 65 |{nowait}|...\dite|
|00001780| 6d 5b 5c 76 61 72 7b 75 | 73 65 72 7d 5d 0a 20 20 |m[\var{u|ser}]. |
|00001790| 20 20 20 20 20 20 54 68 | 69 73 20 69 73 20 74 68 | Th|is is th|
|000017a0| 65 20 6c 6f 67 69 6e 20 | 69 64 20 6f 66 20 74 68 |e login |id of th|
|000017b0| 65 20 75 73 65 72 20 74 | 68 65 20 70 72 6f 63 65 |e user t|he proce|
|000017c0| 73 73 20 69 73 20 65 78 | 65 63 75 74 65 64 20 75 |ss is ex|ecuted u|
|000017d0| 6e 64 65 72 2e 0a 20 20 | 20 20 20 20 20 20 54 68 |nder.. | Th|
|000017e0| 69 73 20 77 69 6c 6c 20 | 66 72 65 71 75 65 6e 74 |is will |frequent|
|000017f0| 6c 79 20 62 65 20 74 68 | 65 20 5c 75 73 65 72 7b |ly be th|e \user{|
|00001800| 72 6f 6f 74 7d 20 75 73 | 65 72 2c 20 62 75 74 20 |root} us|er, but |
|00001810| 73 6f 6d 65 20 73 65 72 | 76 69 63 65 73 0a 20 20 |some ser|vices. |
|00001820| 20 20 20 20 20 20 6d 61 | 79 20 75 73 65 20 64 69 | ma|y use di|
|00001830| 66 66 65 72 65 6e 74 20 | 61 63 63 6f 75 6e 74 73 |fferent |accounts|
|00001840| 2e 20 49 74 20 69 73 20 | 61 20 76 65 72 79 20 67 |. It is |a very g|
|00001850| 6f 6f 64 20 69 64 65 61 | 20 74 6f 20 61 70 70 6c |ood idea| to appl|
|00001860| 79 20 74 68 65 0a 20 20 | 20 20 20 20 20 20 70 72 |y the. | pr|
|00001870| 69 6e 63 69 70 6c 65 20 | 6f 66 20 6c 65 61 73 74 |inciple |of least|
|00001880| 20 70 72 69 76 69 6c 65 | 67 65 20 68 65 72 65 2c | privile|ge here,|
|00001890| 20 77 68 69 63 68 20 73 | 74 61 74 65 73 20 74 68 | which s|tates th|
|000018a0| 61 74 20 79 6f 75 20 73 | 68 6f 75 6c 64 6e 27 74 |at you s|houldn't|
|000018b0| 0a 20 20 20 20 20 20 20 | 20 72 75 6e 20 61 20 63 |. | run a c|
|000018c0| 6f 6d 6d 61 6e 64 20 75 | 6e 64 65 72 20 61 20 70 |ommand u|nder a p|
|000018d0| 72 69 76 69 6c 65 67 65 | 64 20 61 63 63 6f 75 6e |rivilege|d accoun|
|000018e0| 74 20 69 66 20 74 68 65 | 20 70 72 6f 67 72 61 6d |t if the| program|
|000018f0| 20 64 6f 65 73 6e 27 74 | 0a 20 20 20 20 20 20 20 | doesn't|. |
|00001900| 20 72 65 71 75 69 72 65 | 20 74 68 69 73 20 66 6f | require| this fo|
|00001910| 72 20 70 72 6f 70 65 72 | 20 66 75 6e 63 74 69 6f |r proper| functio|
|00001920| 6e 69 6e 67 2e 0a 20 20 | 20 20 20 20 20 20 46 6f |ning.. | Fo|
|00001930| 72 20 65 78 61 6d 70 6c | 65 2c 20 74 68 65 20 4e |r exampl|e, the N|
|00001940| 4e 54 50 20 6e 65 77 73 | 20 73 65 72 76 65 72 20 |NTP news| server |
|00001950| 77 69 6c 6c 20 72 75 6e | 20 61 73 20 5c 75 73 65 |will run| as \use|
|00001960| 72 7b 6e 65 77 73 7d 2c | 20 77 68 69 6c 65 0a 20 |r{news},| while. |
|00001970| 20 20 20 20 20 20 20 73 | 65 72 76 69 63 65 73 20 | s|ervices |
|00001980| 74 68 61 74 20 6d 61 79 | 20 70 6f 73 65 20 61 20 |that may| pose a |
|00001990| 73 65 63 75 72 69 74 79 | 20 72 69 73 6b 20 28 73 |security| risk (s|
|000019a0| 75 63 68 20 61 73 20 5c | 70 72 6f 67 7b 74 66 74 |uch as \|prog{tft|
|000019b0| 70 7d 20 6f 72 0a 20 20 | 20 20 20 20 20 20 5c 70 |p} or. | \p|
|000019c0| 72 6f 67 7b 66 69 6e 67 | 65 72 7d 29 20 61 72 65 |rog{fing|er}) are|
|000019d0| 20 6f 66 74 65 6e 20 72 | 75 6e 20 61 73 20 5c 75 | often r|un as \u|
|000019e0| 73 65 72 7b 6e 6f 62 6f | 64 79 7d 2e 0a 0a 5c 64 |ser{nobo|dy}...\d|
|000019f0| 69 74 65 6d 5b 5c 76 61 | 72 7b 73 65 72 76 65 72 |item[\va|r{server|
|00001a00| 7d 5d 0a 20 20 20 20 20 | 20 20 20 67 69 76 65 73 |}]. | gives|
|00001a10| 20 74 68 65 20 66 75 6c | 6c 20 70 61 74 68 20 6e | the ful|l path n|
|00001a20| 61 6d 65 20 6f 66 20 74 | 68 65 20 73 65 72 76 65 |ame of t|he serve|
|00001a30| 72 20 70 72 6f 67 72 61 | 6d 20 74 6f 20 62 65 20 |r progra|m to be |
|00001a40| 65 78 65 63 75 74 65 64 | 2e 0a 20 20 20 20 20 20 |executed|.. |
|00001a50| 20 20 49 6e 74 65 72 6e | 61 6c 20 73 65 72 76 69 | Intern|al servi|
|00001a60| 63 65 73 20 61 72 65 20 | 6d 61 72 6b 65 64 20 62 |ces are |marked b|
|00001a70| 79 20 74 68 65 20 6b 65 | 79 77 6f 72 64 20 5c 6b |y the ke|yword \k|
|00001a80| 65 79 77 6f 72 64 7b 69 | 6e 74 65 72 6e 61 6c 7d |eyword{i|nternal}|
|00001a90| 2e 0a 0a 5c 64 69 74 65 | 6d 5b 5c 76 61 72 7b 63 |...\dite|m[\var{c|
|00001aa0| 6d 64 6c 69 6e 65 7d 5d | 0a 20 20 20 20 20 20 20 |mdline}]|. |
|00001ab0| 20 54 68 69 73 20 69 73 | 20 74 68 65 20 63 6f 6d | This is| the com|
|00001ac0| 6d 61 6e 64 20 6c 69 6e | 65 20 74 6f 20 62 65 20 |mand lin|e to be |
|00001ad0| 70 61 73 73 65 64 20 74 | 6f 20 74 68 65 20 73 65 |passed t|o the se|
|00001ae0| 72 76 65 72 2e 20 54 68 | 69 73 20 69 6e 63 6c 75 |rver. Th|is inclu|
|00001af0| 64 65 73 0a 20 20 20 20 | 20 20 20 20 61 72 67 75 |des. | argu|
|00001b00| 6d 65 6e 74 7e 30 2c 20 | 74 68 61 74 20 69 73 20 |ment~0, |that is |
|00001b10| 74 68 65 20 63 6f 6d 6d | 61 6e 64 20 6e 61 6d 65 |the comm|and name|
|00001b20| 2e 20 55 73 75 61 6c 6c | 79 2c 20 74 68 69 73 20 |. Usuall|y, this |
|00001b30| 77 69 6c 6c 20 62 65 0a | 20 20 20 20 20 20 20 20 |will be.| |
|00001b40| 74 68 65 20 70 72 6f 67 | 72 61 6d 20 6e 61 6d 65 |the prog|ram name|
|00001b50| 20 6f 66 20 74 68 65 20 | 73 65 72 76 65 72 2c 20 | of the |server, |
|00001b60| 75 6e 6c 65 73 73 20 74 | 68 65 20 70 72 6f 67 72 |unless t|he progr|
|00001b70| 61 6d 20 62 65 68 61 76 | 65 73 0a 20 20 20 20 20 |am behav|es. |
|00001b80| 20 20 20 64 69 66 66 65 | 72 65 6e 74 6c 79 20 77 | diffe|rently w|
|00001b90| 68 65 6e 20 69 6e 76 6f | 6b 65 64 20 62 79 20 61 |hen invo|ked by a|
|00001ba0| 20 64 69 66 66 65 72 65 | 6e 74 20 6e 61 6d 65 2e | differe|nt name.|
|00001bb0| 0a 0a 20 20 20 20 20 20 | 20 20 54 68 69 73 20 66 |.. | This f|
|00001bc0| 69 65 6c 64 20 69 73 20 | 65 6d 70 74 79 20 66 6f |ield is |empty fo|
|00001bd0| 72 20 69 6e 74 65 72 6e | 61 6c 20 73 65 72 76 69 |r intern|al servi|
|00001be0| 63 65 73 2e 0a 0a 5c 65 | 6e 64 7b 64 69 73 70 69 |ces...\e|nd{dispi|
|00001bf0| 74 65 6d 73 7d 0a 0a 0a | 5c 62 65 67 69 6e 7b 66 |tems}...|\begin{f|
|00001c00| 69 67 75 72 65 7d 5b 68 | 62 74 70 5d 0a 5c 62 65 |igure}[h|btp].\be|
|00001c10| 67 69 6e 7b 74 73 63 72 | 65 65 6e 7d 0a 5c 62 65 |gin{tscr|een}.\be|
|00001c20| 67 69 6e 7b 76 65 72 62 | 61 74 69 6d 7d 0a 23 20 |gin{verb|atim}.# |
|00001c30| 0a 23 20 69 6e 65 74 64 | 20 73 65 72 76 69 63 65 |.# inetd| service|
|00001c40| 73 0a 66 74 70 20 20 20 | 20 20 20 20 73 74 72 65 |s.ftp | stre|
|00001c50| 61 6d 20 74 63 70 20 6e | 6f 77 61 69 74 20 72 6f |am tcp n|owait ro|
|00001c60| 6f 74 20 20 20 2f 75 73 | 72 2f 73 62 69 6e 2f 66 |ot /us|r/sbin/f|
|00001c70| 74 70 64 20 20 20 20 69 | 6e 2e 66 74 70 64 20 2d |tpd i|n.ftpd -|
|00001c80| 6c 0a 74 65 6c 6e 65 74 | 20 20 20 20 73 74 72 65 |l.telnet| stre|
|00001c90| 61 6d 20 74 63 70 20 6e | 6f 77 61 69 74 20 72 6f |am tcp n|owait ro|
|00001ca0| 6f 74 20 20 20 2f 75 73 | 72 2f 73 62 69 6e 2f 74 |ot /us|r/sbin/t|
|00001cb0| 65 6c 6e 65 74 64 20 69 | 6e 2e 74 65 6c 6e 65 74 |elnetd i|n.telnet|
|00001cc0| 64 20 2d 62 2f 65 74 63 | 2f 69 73 73 75 65 0a 23 |d -b/etc|/issue.#|
|00001cd0| 66 69 6e 67 65 72 20 20 | 20 20 73 74 72 65 61 6d |finger | stream|
|00001ce0| 20 74 63 70 20 6e 6f 77 | 61 69 74 20 62 69 6e 20 | tcp now|ait bin |
|00001cf0| 20 20 20 2f 75 73 72 2f | 73 62 69 6e 2f 66 69 6e | /usr/|sbin/fin|
|00001d00| 67 65 72 64 20 69 6e 2e | 66 69 6e 67 65 72 64 0a |gerd in.|fingerd.|
|00001d10| 23 74 66 74 70 20 20 20 | 20 20 20 64 67 72 61 6d |#tftp | dgram|
|00001d20| 20 20 75 64 70 20 77 61 | 69 74 20 20 20 6e 6f 62 | udp wa|it nob|
|00001d30| 6f 64 79 20 2f 75 73 72 | 2f 73 62 69 6e 2f 74 66 |ody /usr|/sbin/tf|
|00001d40| 74 70 64 20 20 20 69 6e | 2e 74 66 74 70 64 0a 23 |tpd in|.tftpd.#|
|00001d50| 74 66 74 70 20 20 20 20 | 20 20 64 67 72 61 6d 20 |tftp | dgram |
|00001d60| 20 75 64 70 20 77 61 69 | 74 20 20 20 6e 6f 62 6f | udp wai|t nobo|
|00001d70| 64 79 20 2f 75 73 72 2f | 73 62 69 6e 2f 74 66 74 |dy /usr/|sbin/tft|
|00001d80| 70 64 20 20 20 69 6e 2e | 74 66 74 70 64 20 2f 62 |pd in.|tftpd /b|
|00001d90| 6f 6f 74 2f 64 69 73 6b | 6c 65 73 73 0a 6c 6f 67 |oot/disk|less.log|
|00001da0| 69 6e 20 20 20 20 20 73 | 74 72 65 61 6d 20 74 63 |in s|tream tc|
|00001db0| 70 20 6e 6f 77 61 69 74 | 20 72 6f 6f 74 20 20 20 |p nowait| root |
|00001dc0| 2f 75 73 72 2f 73 62 69 | 6e 2f 72 6c 6f 67 69 6e |/usr/sbi|n/rlogin|
|00001dd0| 64 20 69 6e 2e 72 6c 6f | 67 69 6e 64 0a 73 68 65 |d in.rlo|gind.she|
|00001de0| 6c 6c 20 20 20 20 20 73 | 74 72 65 61 6d 20 74 63 |ll s|tream tc|
|00001df0| 70 20 6e 6f 77 61 69 74 | 20 72 6f 6f 74 20 20 20 |p nowait| root |
|00001e00| 2f 75 73 72 2f 73 62 69 | 6e 2f 72 73 68 64 20 20 |/usr/sbi|n/rshd |
|00001e10| 20 20 69 6e 2e 72 73 68 | 64 0a 65 78 65 63 20 20 | in.rsh|d.exec |
|00001e20| 20 20 20 20 73 74 72 65 | 61 6d 20 74 63 70 20 6e | stre|am tcp n|
|00001e30| 6f 77 61 69 74 20 72 6f | 6f 74 20 20 20 2f 75 73 |owait ro|ot /us|
|00001e40| 72 2f 73 62 69 6e 2f 72 | 65 78 65 63 64 20 20 69 |r/sbin/r|execd i|
|00001e50| 6e 2e 72 65 78 65 63 64 | 0a 23 0a 23 20 20 20 20 |n.rexecd|.#.# |
|00001e60| 20 20 20 69 6e 65 74 64 | 20 69 6e 74 65 72 6e 61 | inetd| interna|
|00001e70| 6c 20 73 65 72 76 69 63 | 65 73 0a 23 0a 64 61 79 |l servic|es.#.day|
|00001e80| 74 69 6d 65 20 20 20 73 | 74 72 65 61 6d 20 74 63 |time s|tream tc|
|00001e90| 70 20 6e 6f 77 61 69 74 | 20 72 6f 6f 74 20 69 6e |p nowait| root in|
|00001ea0| 74 65 72 6e 61 6c 0a 64 | 61 79 74 69 6d 65 20 20 |ternal.d|aytime |
|00001eb0| 20 64 67 72 61 6d 20 20 | 75 64 70 20 6e 6f 77 61 | dgram |udp nowa|
|00001ec0| 69 74 20 72 6f 6f 74 20 | 69 6e 74 65 72 6e 61 6c |it root |internal|
|00001ed0| 0a 74 69 6d 65 20 20 20 | 20 20 20 73 74 72 65 61 |.time | strea|
|00001ee0| 6d 20 74 63 70 20 6e 6f | 77 61 69 74 20 72 6f 6f |m tcp no|wait roo|
|00001ef0| 74 20 69 6e 74 65 72 6e | 61 6c 0a 74 69 6d 65 20 |t intern|al.time |
|00001f00| 20 20 20 20 20 64 67 72 | 61 6d 20 20 75 64 70 20 | dgr|am udp |
|00001f10| 6e 6f 77 61 69 74 20 72 | 6f 6f 74 20 69 6e 74 65 |nowait r|oot inte|
|00001f20| 72 6e 61 6c 0a 65 63 68 | 6f 20 20 20 20 20 20 73 |rnal.ech|o s|
|00001f30| 74 72 65 61 6d 20 74 63 | 70 20 6e 6f 77 61 69 74 |tream tc|p nowait|
|00001f40| 20 72 6f 6f 74 20 69 6e | 74 65 72 6e 61 6c 0a 65 | root in|ternal.e|
|00001f50| 63 68 6f 20 20 20 20 20 | 20 64 67 72 61 6d 20 20 |cho | dgram |
|00001f60| 75 64 70 20 6e 6f 77 61 | 69 74 20 72 6f 6f 74 20 |udp nowa|it root |
|00001f70| 69 6e 74 65 72 6e 61 6c | 0a 64 69 73 63 61 72 64 |internal|.discard|
|00001f80| 20 20 20 73 74 72 65 61 | 6d 20 74 63 70 20 6e 6f | strea|m tcp no|
|00001f90| 77 61 69 74 20 72 6f 6f | 74 20 69 6e 74 65 72 6e |wait roo|t intern|
|00001fa0| 61 6c 0a 64 69 73 63 61 | 72 64 20 20 20 64 67 72 |al.disca|rd dgr|
|00001fb0| 61 6d 20 20 75 64 70 20 | 6e 6f 77 61 69 74 20 72 |am udp |nowait r|
|00001fc0| 6f 6f 74 20 69 6e 74 65 | 72 6e 61 6c 0a 63 68 61 |oot inte|rnal.cha|
|00001fd0| 72 67 65 6e 20 20 20 73 | 74 72 65 61 6d 20 74 63 |rgen s|tream tc|
|00001fe0| 70 20 6e 6f 77 61 69 74 | 20 72 6f 6f 74 20 69 6e |p nowait| root in|
|00001ff0| 74 65 72 6e 61 6c 0a 63 | 68 61 72 67 65 6e 20 20 |ternal.c|hargen |
|00002000| 20 64 67 72 61 6d 20 20 | 75 64 70 20 6e 6f 77 61 | dgram |udp nowa|
|00002010| 69 74 20 72 6f 6f 74 20 | 69 6e 74 65 72 6e 61 6c |it root |internal|
|00002020| 0a 5c 65 6e 64 7b 76 65 | 72 62 61 74 69 6d 7d 0a |.\end{ve|rbatim}.|
|00002030| 5c 65 6e 64 7b 74 73 63 | 72 65 65 6e 7d 0a 20 5c |\end{tsc|reen}. \|
|00002040| 63 61 70 74 69 6f 6e 7b | 0a 20 20 5c 6c 61 62 65 |caption{|. \labe|
|00002050| 6c 7b 61 70 70 6c 2e 66 | 69 67 2e 69 6e 65 74 64 |l{appl.f|ig.inetd|
|00002060| 2e 63 6f 6e 66 7d 0a 20 | 20 41 20 73 61 6d 70 6c |.conf}. | A sampl|
|00002070| 65 20 5c 66 69 6c 65 7b | 2f 65 74 63 2f 69 6e 65 |e \file{|/etc/ine|
|00002080| 74 64 2e 63 6f 6e 66 7d | 20 66 69 6c 65 2e 0a 20 |td.conf}| file.. |
|00002090| 7d 0a 5c 65 6e 64 7b 66 | 69 67 75 72 65 7d 0a 0a |}.\end{f|igure}..|
|000020a0| 0a 5c 69 6e 64 65 78 7b | 73 65 63 75 72 69 74 79 |.\index{|security|
|000020b0| 21 54 43 50 20 73 65 72 | 76 65 72 73 7d 0a 5c 69 |!TCP ser|vers}.\i|
|000020c0| 6e 64 65 78 7b 66 69 6e | 67 65 72 40 5c 70 72 6f |ndex{fin|ger@\pro|
|000020d0| 67 7b 66 69 6e 67 65 72 | 7d 7d 0a 41 20 73 61 6d |g{finger|}}.A sam|
|000020e0| 70 6c 65 20 5c 66 69 6c | 65 7b 69 6e 65 74 64 2e |ple \fil|e{inetd.|
|000020f0| 63 6f 6e 66 7d 20 66 69 | 6c 65 20 69 73 20 73 68 |conf} fi|le is sh|
|00002100| 6f 77 6e 20 69 6e 20 66 | 69 67 75 72 65 7e 5c 72 |own in f|igure~\r|
|00002110| 65 66 7b 61 70 70 6c 2e | 66 69 67 2e 69 6e 65 74 |ef{appl.|fig.inet|
|00002120| 64 2e 63 6f 6e 66 7d 2e | 0a 54 68 65 20 5c 70 72 |d.conf}.|.The \pr|
|00002130| 6f 67 7b 66 69 6e 67 65 | 72 7d 20 73 65 72 76 69 |og{finge|r} servi|
|00002140| 63 65 20 63 6f 6d 6d 65 | 6e 74 65 64 20 6f 75 74 |ce comme|nted out|
|00002150| 2c 20 73 6f 20 74 68 61 | 74 20 69 74 20 69 73 20 |, so tha|t it is |
|00002160| 6e 6f 74 20 61 76 61 69 | 6c 61 62 6c 65 2e 0a 54 |not avai|lable..T|
|00002170| 68 69 73 20 69 73 20 6f | 66 74 65 6e 20 64 6f 6e |his is o|ften don|
|00002180| 65 20 66 6f 72 20 73 65 | 63 75 72 69 74 79 20 72 |e for se|curity r|
|00002190| 65 61 73 6f 6e 73 2c 20 | 62 65 63 61 75 73 65 20 |easons, |because |
|000021a0| 6d 61 79 20 62 65 20 75 | 73 65 64 20 62 79 0a 61 |may be u|sed by.a|
|000021b0| 74 74 61 63 6b 65 72 73 | 20 74 6f 20 6f 62 74 61 |ttackers| to obta|
|000021c0| 69 6e 20 6e 61 6d 65 73 | 20 6f 66 20 75 73 65 72 |in names| of user|
|000021d0| 73 20 6f 6e 20 79 6f 75 | 72 20 73 79 73 74 65 6d |s on you|r system|
|000021e0| 2e 0a 0a 0a 5c 69 6e 64 | 65 78 7b 54 46 54 50 7c |....\ind|ex{TFTP||
|000021f0| 73 65 65 20 7b 54 72 69 | 76 69 61 6c 20 46 69 6c |see {Tri|vial Fil|
|00002200| 65 20 54 72 61 6e 73 66 | 65 72 20 50 72 6f 74 6f |e Transf|er Proto|
|00002210| 63 6f 6c 7d 7d 0a 5c 69 | 6e 64 65 78 7b 54 72 69 |col}}.\i|ndex{Tri|
|00002220| 76 69 61 6c 20 46 69 6c | 65 20 54 72 61 6e 73 66 |vial Fil|e Transf|
|00002230| 65 72 20 50 72 6f 74 6f | 63 6f 6c 7d 0a 5c 69 6e |er Proto|col}.\in|
|00002240| 64 65 78 7b 74 66 74 70 | 40 5c 70 72 6f 67 7b 74 |dex{tftp|@\prog{t|
|00002250| 66 74 70 7d 7d 0a 54 68 | 65 20 5c 70 72 6f 67 7b |ftp}}.Th|e \prog{|
|00002260| 74 66 74 70 7d 20 69 73 | 20 73 68 6f 77 6e 20 63 |tftp} is| shown c|
|00002270| 6f 6d 6d 65 6e 74 65 64 | 20 6f 75 74 20 61 73 20 |ommented| out as |
|00002280| 77 65 6c 6c 2e 20 5c 70 | 72 6f 67 7b 74 66 74 70 |well. \p|rog{tftp|
|00002290| 7d 20 69 6d 70 6c 65 6d | 65 6e 74 73 0a 74 68 65 |} implem|ents.the|
|000022a0| 20 5c 65 6d 70 68 7b 50 | 72 69 6d 69 74 69 76 65 | \emph{P|rimitive|
|000022b0| 20 46 69 6c 65 20 54 72 | 61 6e 73 66 65 72 20 50 | File Tr|ansfer P|
|000022c0| 72 6f 74 6f 63 6f 6c 7d | 20 74 68 61 74 20 61 6c |rotocol}| that al|
|000022d0| 6c 6f 77 73 20 74 6f 20 | 74 72 61 6e 73 66 65 72 |lows to |transfer|
|000022e0| 20 61 6e 79 0a 77 6f 72 | 6c 64 2d 72 65 61 64 61 | any.wor|ld-reada|
|000022f0| 62 6c 65 20 66 69 6c 65 | 73 20 66 72 6f 6d 20 79 |ble file|s from y|
|00002300| 6f 75 72 20 73 79 73 74 | 65 6d 20 77 69 74 68 6f |our syst|em witho|
|00002310| 75 74 20 70 61 73 73 77 | 6f 72 64 20 63 68 65 63 |ut passw|ord chec|
|00002320| 6b 69 6e 67 20 65 74 63 | 2e 0a 54 68 69 73 20 69 |king etc|..This i|
|00002330| 73 20 65 73 70 65 63 69 | 61 6c 6c 79 20 68 61 72 |s especi|ally har|
|00002340| 6d 66 75 6c 20 77 69 74 | 68 20 74 68 65 20 5c 66 |mful wit|h the \f|
|00002350| 69 6c 65 7b 2f 65 74 63 | 2f 70 61 73 73 77 64 7d |ile{/etc|/passwd}|
|00002360| 20 66 69 6c 65 2c 20 65 | 76 65 6e 20 6d 6f 72 65 | file, e|ven more|
|00002370| 0a 73 6f 20 77 68 65 6e | 20 79 6f 75 20 64 6f 6e |.so when| you don|
|00002380| 27 74 20 75 73 65 20 73 | 68 61 64 6f 77 20 70 61 |'t use s|hadow pa|
|00002390| 73 73 77 6f 72 64 2e 0a | 0a 0a 54 46 54 50 20 69 |ssword..|..TFTP i|
|000023a0| 73 20 63 6f 6d 6d 6f 6e | 6c 79 20 75 73 65 64 20 |s common|ly used |
|000023b0| 62 79 20 64 69 73 6b 6c | 65 73 73 20 63 6c 69 65 |by diskl|ess clie|
|000023c0| 6e 74 73 20 61 6e 64 20 | 58 7e 74 65 72 6d 69 6e |nts and |X~termin|
|000023d0| 61 6c 73 20 74 6f 20 64 | 6f 77 6e 6c 6f 61 64 0a |als to d|ownload.|
|000023e0| 74 68 65 69 72 20 63 6f | 64 65 20 66 72 6f 6d 20 |their co|de from |
|000023f0| 61 20 62 6f 6f 74 20 73 | 65 72 76 65 72 2e 20 49 |a boot s|erver. I|
|00002400| 66 20 79 6f 75 20 6e 65 | 65 64 20 74 6f 20 72 75 |f you ne|ed to ru|
|00002410| 6e 20 5c 70 72 6f 67 7b | 74 66 74 70 64 7d 20 66 |n \prog{|tftpd} f|
|00002420| 6f 72 20 74 68 69 73 0a | 72 65 61 73 6f 6e 2c 20 |or this.|reason, |
|00002430| 6d 61 6b 65 20 73 75 72 | 65 20 74 6f 20 6c 69 6d |make sur|e to lim|
|00002440| 69 74 20 69 74 73 20 73 | 63 6f 70 65 20 74 6f 20 |it its s|cope to |
|00002450| 74 68 6f 73 65 20 64 69 | 72 65 63 74 6f 72 69 65 |those di|rectorie|
|00002460| 73 20 63 6c 69 65 6e 74 | 73 20 77 69 6c 6c 0a 72 |s client|s will.r|
|00002470| 65 74 72 69 65 76 65 20 | 66 69 6c 65 73 20 66 72 |etrieve |files fr|
|00002480| 6f 6d 20 62 79 20 61 64 | 64 69 6e 67 20 74 68 6f |om by ad|ding tho|
|00002490| 73 65 20 64 69 72 65 63 | 74 6f 72 79 20 6e 61 6d |se direc|tory nam|
|000024a0| 65 73 20 74 6f 20 5c 70 | 72 6f 67 7b 74 66 74 70 |es to \p|rog{tftp|
|000024b0| 64 7d 27 73 0a 63 6f 6d | 6d 61 6e 64 20 6c 69 6e |d}'s.com|mand lin|
|000024c0| 65 2e 20 54 68 69 73 20 | 69 73 20 73 68 6f 77 6e |e. This |is shown|
|000024d0| 20 69 6e 20 74 68 65 20 | 73 65 63 6f 6e 64 20 5c | in the |second \|
|000024e0| 70 72 6f 67 7b 74 66 74 | 70 7d 20 6c 69 6e 65 20 |prog{tft|p} line |
|000024f0| 69 6e 20 74 68 65 0a 65 | 78 61 6d 70 6c 65 2e 0a |in the.e|xample..|
|00002500| 0a 5c 69 6e 64 65 78 7b | 69 6e 65 74 64 2e 63 6f |.\index{|inetd.co|
|00002510| 6e 66 40 5c 66 69 6c 65 | 7b 69 6e 65 74 64 2e 63 |nf@\file|{inetd.c|
|00002520| 6f 6e 66 7d 7c 29 7d 0a | 0a 0a 5c 73 65 63 74 69 |onf}|)}.|..\secti|
|00002530| 6f 6e 7b 54 68 65 20 5c | 70 72 6f 67 7b 74 63 70 |on{The \|prog{tcp|
|00002540| 64 7d 20 61 63 63 65 73 | 73 20 63 6f 6e 74 72 6f |d} acces|s contro|
|00002550| 6c 20 66 61 63 69 6c 69 | 74 79 7d 0a 25 25 25 25 |l facili|ty}.%%%%|
|00002560| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|00002570| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|00002580| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|00002590| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 0a 5c 6c |%%%%%%%%|%%%%%.\l|
|000025a0| 61 62 65 6c 7b 61 70 70 | 6c 2e 74 63 70 64 7d 0a |abel{app|l.tcpd}.|
|000025b0| 5c 69 6e 64 65 78 7b 73 | 65 63 75 72 69 74 79 21 |\index{s|ecurity!|
|000025c0| 54 43 50 20 73 65 72 76 | 65 72 73 7d 0a 5c 69 6e |TCP serv|ers}.\in|
|000025d0| 64 65 78 7b 73 65 72 76 | 69 63 65 73 21 72 65 73 |dex{serv|ices!res|
|000025e0| 74 72 69 63 74 69 6e 67 | 20 61 63 63 65 73 73 7d |tricting| access}|
|000025f0| 0a 5c 69 6e 64 65 78 7b | 61 63 63 65 73 73 21 72 |.\index{|access!r|
|00002600| 65 73 74 72 69 63 74 69 | 6e 67 7d 0a 5c 69 6e 64 |estricti|ng}.\ind|
|00002610| 65 78 7b 72 65 73 74 72 | 69 63 74 69 6e 67 20 61 |ex{restr|icting a|
|00002620| 63 63 65 73 73 7d 0a 5c | 69 6e 64 65 78 7b 77 72 |ccess}.\|index{wr|
|00002630| 61 70 70 65 72 2c 20 54 | 43 50 7d 0a 5c 69 6e 64 |apper, T|CP}.\ind|
|00002640| 65 78 7b 54 43 50 21 77 | 72 61 70 70 65 72 20 70 |ex{TCP!w|rapper p|
|00002650| 72 6f 67 72 61 6d 7d 0a | 5c 69 6e 64 65 78 7b 74 |rogram}.|\index{t|
|00002660| 63 70 64 40 5c 70 72 6f | 67 7b 74 63 70 64 7d 7c |cpd@\pro|g{tcpd}||
|00002670| 28 7d 0a 5c 69 6e 64 65 | 78 7b 73 65 72 76 65 72 |(}.\inde|x{server|
|00002680| 21 69 6e 65 74 64 40 5c | 70 72 6f 67 7b 74 63 70 |!inetd@\|prog{tcp|
|00002690| 64 7d 7c 28 7d 0a 0a 53 | 69 6e 63 65 20 6f 70 65 |d}|(}..S|ince ope|
|000026a0| 6e 69 6e 67 20 61 20 63 | 6f 6d 70 75 74 65 72 20 |ning a c|omputer |
|000026b0| 74 6f 20 6e 65 74 77 6f | 72 6b 20 61 63 63 65 73 |to netwo|rk acces|
|000026c0| 73 20 69 6e 76 6f 6c 76 | 65 73 20 6d 61 6e 79 20 |s involv|es many |
|000026d0| 73 65 63 75 72 69 74 79 | 20 72 69 73 6b 73 2c 0a |security| risks,.|
|000026e0| 61 70 70 6c 69 63 61 74 | 69 6f 6e 73 20 61 72 65 |applicat|ions are|
|000026f0| 20 64 65 73 69 67 6e 65 | 64 20 74 6f 20 67 75 61 | designe|d to gua|
|00002700| 72 64 20 61 67 61 69 6e | 73 74 20 73 65 76 65 72 |rd again|st sever|
|00002710| 61 6c 20 74 79 70 65 73 | 20 6f 66 20 61 74 74 61 |al types| of atta|
|00002720| 63 6b 73 2e 0a 53 6f 6d | 65 20 6f 66 20 74 68 65 |cks..Som|e of the|
|00002730| 73 65 2c 20 68 6f 77 65 | 76 65 72 2c 20 6d 61 79 |se, howe|ver, may|
|00002740| 20 62 65 20 66 6c 61 77 | 65 64 20 28 6d 6f 73 74 | be flaw|ed (most|
|00002750| 20 64 72 61 73 74 69 63 | 61 6c 6c 79 20 64 65 6d | drastic|ally dem|
|00002760| 6f 6e 73 74 72 61 74 65 | 64 0a 62 79 20 74 68 65 |onstrate|d.by the|
|00002770| 20 52 54 4d 20 49 6e 74 | 65 72 6e 65 74 20 77 6f | RTM Int|ernet wo|
|00002780| 72 6d 29 2c 20 6f 72 20 | 64 6f 20 6e 6f 74 20 64 |rm), or |do not d|
|00002790| 69 73 74 69 6e 67 75 69 | 73 68 20 62 65 74 77 65 |istingui|sh betwe|
|000027a0| 65 6e 20 73 65 63 75 72 | 65 20 68 6f 73 74 73 0a |en secur|e hosts.|
|000027b0| 66 72 6f 6d 20 77 68 69 | 63 68 20 72 65 71 75 65 |from whi|ch reque|
|000027c0| 73 74 73 20 66 6f 72 20 | 61 20 70 61 72 74 69 63 |sts for |a partic|
|000027d0| 75 6c 61 72 20 73 65 72 | 76 69 63 65 20 77 69 6c |ular ser|vice wil|
|000027e0| 6c 20 62 65 20 61 63 63 | 65 70 74 65 64 2c 20 61 |l be acc|epted, a|
|000027f0| 6e 64 0a 69 6e 73 65 63 | 75 72 65 20 68 6f 73 74 |nd.insec|ure host|
|00002800| 73 20 77 68 6f 73 65 20 | 72 65 71 75 65 73 74 73 |s whose |requests|
|00002810| 20 73 68 6f 75 6c 64 20 | 62 65 20 72 65 6a 65 63 | should |be rejec|
|00002820| 74 65 64 2e 20 57 65 20 | 61 6c 72 65 61 64 79 20 |ted. We |already |
|00002830| 62 72 69 65 66 6c 79 0a | 64 69 73 63 75 73 73 65 |briefly.|discusse|
|00002840| 64 20 74 68 65 20 5c 70 | 72 6f 67 7b 66 69 6e 67 |d the \p|rog{fing|
|00002850| 65 72 7d 20 61 6e 64 20 | 5c 70 72 6f 67 7b 74 66 |er} and |\prog{tf|
|00002860| 74 70 7d 20 73 65 72 76 | 69 63 65 73 20 61 62 6f |tp} serv|ices abo|
|00002870| 76 65 2e 20 20 54 68 75 | 73 2c 20 6f 6e 65 0a 77 |ve. Thu|s, one.w|
|00002880| 6f 75 6c 64 20 77 61 6e | 74 20 74 6f 20 6c 69 6d |ould wan|t to lim|
|00002890| 69 74 20 61 63 63 65 73 | 73 20 74 6f 20 74 68 65 |it acces|s to the|
|000028a0| 73 65 20 73 65 72 76 69 | 63 65 73 20 74 6f 20 60 |se servi|ces to `|
|000028b0| 60 74 72 75 73 74 65 64 | 20 68 6f 73 74 73 27 27 |`trusted| hosts''|
|000028c0| 20 6f 6e 6c 79 2c 0a 77 | 68 69 63 68 20 69 73 20 | only,.w|hich is |
|000028d0| 69 6d 70 6f 73 73 69 62 | 6c 65 20 77 69 74 68 20 |impossib|le with |
|000028e0| 74 68 65 20 75 73 75 61 | 6c 20 73 65 74 75 70 2c |the usua|l setup,|
|000028f0| 20 77 68 65 72 65 20 5c | 70 72 6f 67 7b 69 6e 65 | where \|prog{ine|
|00002900| 74 64 7d 20 65 69 74 68 | 65 72 0a 70 72 6f 76 69 |td} eith|er.provi|
|00002910| 64 65 73 20 74 68 69 73 | 20 73 65 72 76 69 63 65 |des this| service|
|00002920| 20 74 6f 20 61 6c 6c 20 | 63 6c 69 65 6e 74 73 2c | to all |clients,|
|00002930| 20 6f 72 20 6e 6f 74 20 | 61 74 20 61 6c 6c 2e 0a | or not |at all..|
|00002940| 0a 0a 41 20 75 73 65 66 | 75 6c 20 74 6f 6f 6c 20 |..A usef|ul tool |
|00002950| 66 6f 72 20 74 68 69 73 | 20 69 73 20 5c 70 72 6f |for this| is \pro|
|00002960| 67 7b 74 63 70 64 7d 2c | 5c 66 6f 6f 74 6e 6f 74 |g{tcpd},|\footnot|
|00002970| 65 7b 0a 20 20 57 72 69 | 74 74 65 6e 20 62 79 20 |e{. Wri|tten by |
|00002980| 57 69 65 74 73 65 20 56 | 65 6e 65 6d 61 2c 20 5c |Wietse V|enema, \|
|00002990| 65 6d 61 69 6c 7b 77 69 | 65 74 73 65 40 77 7a 76 |email{wi|etse@wzv|
|000029a0| 2e 77 69 6e 2e 74 75 65 | 2e 6e 6c 7d 2e 0a 7d 20 |.win.tue|.nl}..} |
|000029b0| 61 20 73 6f 2d 63 61 6c | 6c 65 64 20 64 61 65 6d |a so-cal|led daem|
|000029c0| 6f 6e 20 77 72 61 70 70 | 65 72 2e 20 46 6f 72 20 |on wrapp|er. For |
|000029d0| 54 43 50 20 73 65 72 76 | 69 63 65 73 20 79 6f 75 |TCP serv|ices you|
|000029e0| 20 77 61 6e 74 20 74 6f | 20 6d 6f 6e 69 74 6f 72 | want to| monitor|
|000029f0| 20 6f 72 0a 70 72 6f 74 | 65 63 74 2c 20 69 74 20 | or.prot|ect, it |
|00002a00| 69 73 20 69 6e 76 6f 6b | 65 64 20 69 6e 73 74 65 |is invok|ed inste|
|00002a10| 61 64 20 6f 66 20 74 68 | 65 20 73 65 72 76 65 72 |ad of th|e server|
|00002a20| 20 70 72 6f 67 72 61 6d | 2e 20 5c 70 72 6f 67 7b | program|. \prog{|
|00002a30| 74 63 70 64 7d 20 6c 6f | 67 73 0a 74 68 65 20 72 |tcpd} lo|gs.the r|
|00002a40| 65 71 75 65 73 74 20 74 | 6f 20 74 68 65 20 5c 70 |equest t|o the \p|
|00002a50| 72 6f 67 7b 73 79 73 6c | 6f 67 7d 20 64 61 65 6d |rog{sysl|og} daem|
|00002a60| 6f 6e 2c 20 63 6b 65 63 | 6b 73 20 69 66 20 74 68 |on, ckec|ks if th|
|00002a70| 65 20 72 65 6d 6f 74 65 | 20 68 6f 73 74 20 69 73 |e remote| host is|
|00002a80| 0a 61 6c 6c 6f 77 65 64 | 20 74 6f 20 75 73 65 20 |.allowed| to use |
|00002a90| 74 68 61 74 20 73 65 72 | 76 69 63 65 2c 20 61 6e |that ser|vice, an|
|00002aa0| 64 20 6f 6e 6c 79 20 69 | 66 20 74 68 69 73 20 73 |d only i|f this s|
|00002ab0| 75 63 63 65 65 64 73 20 | 77 69 6c 6c 20 69 74 20 |ucceeds |will it |
|00002ac0| 65 78 65 63 75 74 65 73 | 0a 74 68 65 20 72 65 61 |executes|.the rea|
|00002ad0| 6c 20 73 65 72 76 65 72 | 20 70 72 6f 67 72 61 6d |l server| program|
|00002ae0| 2e 20 4e 6f 74 65 20 74 | 68 61 74 20 74 68 69 73 |. Note t|hat this|
|00002af0| 20 64 6f 65 73 20 6e 6f | 74 20 77 6f 72 6b 20 77 | does no|t work w|
|00002b00| 69 74 68 20 55 44 50 2d | 62 61 73 65 64 0a 73 65 |ith UDP-|based.se|
|00002b10| 72 76 69 63 65 73 2e 0a | 0a 0a 46 6f 72 20 65 78 |rvices..|..For ex|
|00002b20| 61 6d 70 6c 65 2c 20 74 | 6f 20 77 72 61 70 20 74 |ample, t|o wrap t|
|00002b30| 68 65 20 5c 70 72 6f 67 | 7b 66 69 6e 67 65 72 7d |he \prog|{finger}|
|00002b40| 20 64 61 65 6d 6f 6e 2c | 20 79 6f 75 20 68 61 76 | daemon,| you hav|
|00002b50| 65 20 74 6f 20 63 68 61 | 6e 67 65 20 74 68 65 0a |e to cha|nge the.|
|00002b60| 63 6f 72 72 65 73 70 6f | 6e 64 69 6e 67 20 6c 69 |correspo|nding li|
|00002b70| 6e 65 20 69 6e 20 5c 66 | 69 6c 65 7b 69 6e 65 74 |ne in \f|ile{inet|
|00002b80| 64 2e 63 6f 6e 66 7d 20 | 74 6f 0a 0a 0a 5c 62 65 |d.conf} |to...\be|
|00002b90| 67 69 6e 7b 74 73 63 72 | 65 65 6e 7d 0a 5c 62 65 |gin{tscr|een}.\be|
|00002ba0| 67 69 6e 7b 76 65 72 62 | 61 74 69 6d 7d 0a 23 20 |gin{verb|atim}.# |
|00002bb0| 77 72 61 70 20 66 69 6e | 67 65 72 20 64 61 65 6d |wrap fin|ger daem|
|00002bc0| 6f 6e 0a 66 69 6e 67 65 | 72 20 20 73 74 72 65 61 |on.finge|r strea|
|00002bd0| 6d 20 20 74 63 70 20 20 | 20 20 20 6e 6f 77 61 69 |m tcp | nowai|
|00002be0| 74 20 20 72 6f 6f 74 20 | 20 20 20 2f 75 73 72 2f |t root | /usr/|
|00002bf0| 73 62 69 6e 2f 74 63 70 | 64 20 20 20 69 6e 2e 66 |sbin/tcp|d in.f|
|00002c00| 69 6e 67 65 72 64 0a 5c | 65 6e 64 7b 76 65 72 62 |ingerd.\|end{verb|
|00002c10| 61 74 69 6d 7d 0a 5c 65 | 6e 64 7b 74 73 63 72 65 |atim}.\e|nd{tscre|
|00002c20| 65 6e 7d 0a 0a 0a 5c 69 | 6e 64 65 78 7b 73 79 73 |en}...\i|ndex{sys|
|00002c30| 6c 6f 67 40 5c 70 72 6f | 67 7b 73 79 73 6c 6f 67 |log@\pro|g{syslog|
|00002c40| 7d 7d 0a 57 69 74 68 6f | 75 74 20 61 64 64 69 6e |}}.Witho|ut addin|
|00002c50| 67 20 61 6e 79 20 61 63 | 63 65 73 73 20 63 6f 6e |g any ac|cess con|
|00002c60| 74 72 6f 6c 2c 20 74 68 | 69 73 20 77 69 6c 6c 20 |trol, th|is will |
|00002c70| 61 70 70 65 61 72 20 74 | 6f 20 74 68 65 20 63 6c |appear t|o the cl|
|00002c80| 69 65 6e 74 0a 6a 75 73 | 74 20 61 73 20 61 20 75 |ient.jus|t as a u|
|00002c90| 73 75 61 6c 20 5c 70 72 | 6f 67 7b 66 69 6e 67 65 |sual \pr|og{finge|
|00002ca0| 72 7d 20 73 65 74 75 70 | 2c 20 65 78 63 65 70 74 |r} setup|, except|
|00002cb0| 20 74 68 61 74 20 61 6e | 79 20 72 65 71 75 65 73 | that an|y reques|
|00002cc0| 74 73 20 61 72 65 20 6c | 6f 67 67 65 64 0a 74 6f |ts are l|ogged.to|
|00002cd0| 20 5c 70 72 6f 67 7b 73 | 79 73 6c 6f 67 7d 27 73 | \prog{s|yslog}'s|
|00002ce0| 20 5c 6b 65 79 77 6f 72 | 64 7b 61 75 74 68 7d 20 | \keywor|d{auth} |
|00002cf0| 66 61 63 69 6c 69 74 79 | 2e 0a 0a 0a 41 63 63 65 |facility|....Acce|
|00002d00| 73 73 20 63 6f 6e 74 72 | 6f 6c 20 69 73 20 69 6d |ss contr|ol is im|
|00002d10| 70 6c 65 6d 65 6e 74 65 | 64 20 62 79 20 6d 65 61 |plemente|d by mea|
|00002d20| 6e 73 20 6f 66 20 74 77 | 6f 20 66 69 6c 65 73 20 |ns of tw|o files |
|00002d30| 63 61 6c 6c 65 64 0a 5c | 66 69 6c 65 7b 2f 65 74 |called.\|file{/et|
|00002d40| 63 2f 68 6f 73 74 73 2e | 61 6c 6c 6f 77 7d 20 61 |c/hosts.|allow} a|
|00002d50| 6e 64 20 5c 66 69 6c 65 | 7b 2f 65 74 63 2f 68 6f |nd \file|{/etc/ho|
|00002d60| 73 74 73 2e 64 65 6e 79 | 7d 2e 20 20 54 68 65 79 |sts.deny|}. They|
|00002d70| 20 63 6f 6e 74 61 69 6e | 0a 65 6e 74 72 69 65 73 | contain|.entries|
|00002d80| 20 61 6c 6c 6f 77 69 6e | 67 20 61 6e 64 20 64 65 | allowin|g and de|
|00002d90| 6e 79 69 6e 67 20 61 63 | 63 65 73 73 2c 20 72 65 |nying ac|cess, re|
|00002da0| 73 70 65 63 74 69 76 65 | 6c 79 2c 20 74 6f 20 63 |spective|ly, to c|
|00002db0| 65 72 74 61 69 6e 20 73 | 65 72 76 69 63 65 73 0a |ertain s|ervices.|
|00002dc0| 61 6e 64 20 68 6f 73 74 | 73 2e 20 20 57 68 65 6e |and host|s. When|
|00002dd0| 20 5c 70 72 6f 67 7b 74 | 63 70 64 7d 20 68 61 6e | \prog{t|cpd} han|
|00002de0| 64 6c 65 73 20 61 20 72 | 65 71 75 65 73 74 20 66 |dles a r|equest f|
|00002df0| 6f 72 20 61 20 73 65 72 | 76 69 63 65 20 73 75 63 |or a ser|vice suc|
|00002e00| 68 20 61 73 0a 5c 70 72 | 6f 67 7b 66 69 6e 67 65 |h as.\pr|og{finge|
|00002e10| 72 7d 20 66 72 6f 6d 20 | 61 20 63 6c 69 65 6e 74 |r} from |a client|
|00002e20| 20 68 6f 73 74 20 6e 61 | 6d 65 64 20 5c 68 6f 73 | host na|med \hos|
|00002e30| 74 7b 62 69 66 66 2e 66 | 6f 6f 62 61 72 2e 63 6f |t{biff.f|oobar.co|
|00002e40| 6d 7d 2c 20 69 74 0a 73 | 63 61 6e 73 20 5c 66 69 |m}, it.s|cans \fi|
|00002e50| 6c 65 7b 68 6f 73 74 73 | 2e 61 6c 6c 6f 77 7d 20 |le{hosts|.allow} |
|00002e60| 61 6e 64 20 5c 66 69 6c | 65 7b 68 6f 73 74 73 2e |and \fil|e{hosts.|
|00002e70| 64 65 6e 79 7d 20 28 69 | 6e 20 74 68 69 73 20 6f |deny} (i|n this o|
|00002e80| 72 64 65 72 29 20 66 6f | 72 20 61 6e 0a 65 6e 74 |rder) fo|r an.ent|
|00002e90| 72 79 20 6d 61 74 63 68 | 69 6e 67 20 62 6f 74 68 |ry match|ing both|
|00002ea0| 20 74 68 65 20 73 65 72 | 76 69 63 65 20 61 6e 64 | the ser|vice and|
|00002eb0| 20 63 6c 69 65 6e 74 20 | 68 6f 73 74 2e 20 49 66 | client |host. If|
|00002ec0| 20 61 20 6d 61 74 63 68 | 69 6e 67 20 65 6e 74 72 | a match|ing entr|
|00002ed0| 79 0a 69 73 20 66 6f 75 | 6e 64 20 69 6e 20 5c 66 |y.is fou|nd in \f|
|00002ee0| 69 6c 65 7b 68 6f 73 74 | 73 2e 61 6c 6c 6f 77 7d |ile{host|s.allow}|
|00002ef0| 2c 20 61 63 63 65 73 73 | 20 69 73 20 67 72 61 6e |, access| is gran|
|00002f00| 74 65 64 2c 20 72 65 67 | 61 72 64 6c 65 73 73 20 |ted, reg|ardless |
|00002f10| 6f 66 20 61 6e 79 0a 65 | 6e 74 72 79 20 69 6e 20 |of any.e|ntry in |
|00002f20| 5c 66 69 6c 65 7b 68 6f | 73 74 73 2e 64 65 6e 79 |\file{ho|sts.deny|
|00002f30| 7d 2e 20 49 66 20 61 20 | 6d 61 74 63 68 20 69 73 |}. If a |match is|
|00002f40| 20 66 6f 75 6e 64 20 69 | 6e 20 5c 66 69 6c 65 7b | found i|n \file{|
|00002f50| 68 6f 73 74 73 2e 64 65 | 6e 79 7d 2c 0a 74 68 65 |hosts.de|ny},.the|
|00002f60| 20 72 65 71 75 65 73 74 | 20 69 73 20 72 65 6a 65 | request| is reje|
|00002f70| 63 74 65 64 20 62 79 20 | 63 6c 6f 73 69 6e 67 20 |cted by |closing |
|00002f80| 64 6f 77 6e 20 74 68 65 | 20 63 6f 6e 6e 65 63 74 |down the| connect|
|00002f90| 69 6f 6e 2e 20 49 66 20 | 6e 6f 20 6d 61 74 63 68 |ion. If |no match|
|00002fa0| 20 69 73 0a 66 6f 75 6e | 64 20 61 74 20 61 6c 6c | is.foun|d at all|
|00002fb0| 2c 20 74 68 65 20 72 65 | 71 75 65 73 74 20 69 73 |, the re|quest is|
|00002fc0| 20 61 63 63 65 70 74 65 | 64 2e 0a 0a 0a 45 6e 74 | accepte|d....Ent|
|00002fd0| 72 69 65 73 20 69 6e 20 | 74 68 65 20 61 63 63 65 |ries in |the acce|
|00002fe0| 73 73 20 66 69 6c 65 73 | 20 6c 6f 6f 6b 20 6c 69 |ss files| look li|
|00002ff0| 6b 65 20 74 68 69 73 3a | 0a 0a 5c 62 65 67 69 6e |ke this:|..\begin|
|00003000| 7b 74 73 63 72 65 65 6e | 7d 0a 20 5c 76 61 72 7b |{tscreen|}. \var{|
|00003010| 73 65 72 76 69 63 65 6c | 69 73 74 7d 3a 20 5c 76 |servicel|ist}: \v|
|00003020| 61 72 7b 68 6f 73 74 6c | 69 73 74 7d 20 5b 3a 5c |ar{hostl|ist} [:\|
|00003030| 76 61 72 7b 73 68 65 6c | 6c 63 6d 64 7d 5c 2f 5d |var{shel|lcmd}\/]|
|00003040| 0a 5c 65 6e 64 7b 74 73 | 63 72 65 65 6e 7d 0a 0a |.\end{ts|creen}..|
|00003050| 25 5c 69 6e 64 65 6e 74 | 0a 25 54 68 65 73 65 20 |%\indent|.%These |
|00003060| 66 69 65 6c 64 20 68 61 | 76 65 20 74 68 65 20 66 |field ha|ve the f|
|00003070| 6f 6c 6c 6f 77 69 6e 67 | 20 6d 65 61 6e 69 6e 67 |ollowing| meaning|
|00003080| 3a 0a 25 0a 25 5c 62 65 | 67 69 6e 7b 64 69 73 70 |:.%.%\be|gin{disp|
|00003090| 69 74 65 6d 73 7d 0a 0a | 5c 76 61 72 7b 73 65 72 |items}..|\var{ser|
|000030a0| 76 69 63 65 6c 69 73 74 | 7d 20 69 73 20 61 20 6c |vicelist|} is a l|
|000030b0| 69 73 74 20 6f 66 20 73 | 65 72 76 69 63 65 20 6e |ist of s|ervice n|
|000030c0| 61 6d 65 73 20 66 72 6f | 6d 20 5c 66 69 6c 65 7b |ames fro|m \file{|
|000030d0| 2f 65 74 63 2f 73 65 72 | 76 69 63 65 73 7d 2c 0a |/etc/ser|vices},.|
|000030e0| 6f 72 20 74 68 65 20 6b | 65 79 77 6f 72 64 20 5c |or the k|eyword \|
|000030f0| 6b 65 79 77 6f 72 64 7b | 41 4c 4c 7d 2e 20 54 6f |keyword{|ALL}. To|
|00003100| 20 6d 61 74 63 68 20 61 | 6c 6c 20 73 65 72 76 69 | match a|ll servi|
|00003110| 63 65 73 20 65 78 63 65 | 70 74 20 5c 70 72 6f 67 |ces exce|pt \prog|
|00003120| 7b 66 69 6e 67 65 72 7d | 20 61 6e 64 0a 5c 70 72 |{finger}| and.\pr|
|00003130| 6f 67 7b 74 66 74 70 7d | 2c 20 75 73 65 20 60 60 |og{tftp}|, use ``|
|00003140| 5c 6b 65 79 77 6f 72 64 | 7b 41 4c 4c 7d 20 5c 6b |\keyword|{ALL} \k|
|00003150| 65 79 77 6f 72 64 7b 45 | 58 43 45 50 54 7d 20 5c |eyword{E|XCEPT} \|
|00003160| 70 72 6f 67 7b 66 69 6e | 67 65 72 2c 20 74 66 74 |prog{fin|ger, tft|
|00003170| 70 7d 27 27 2e 0a 0a 0a | 5c 76 61 72 7b 68 6f 73 |p}''....|\var{hos|
|00003180| 74 6c 69 73 74 7d 20 69 | 73 20 61 20 6c 69 73 74 |tlist} i|s a list|
|00003190| 20 6f 66 20 68 6f 73 74 | 20 6e 61 6d 65 73 20 6f | of host| names o|
|000031a0| 72 20 49 50 7e 61 64 64 | 72 65 73 73 65 73 2c 20 |r IP~add|resses, |
|000031b0| 6f 72 20 74 68 65 20 6b | 65 79 77 6f 72 64 73 0a |or the k|eywords.|
|000031c0| 5c 6b 65 79 77 6f 72 64 | 7b 41 4c 4c 7d 2c 20 5c |\keyword|{ALL}, \|
|000031d0| 6b 65 79 77 6f 72 64 7b | 4c 4f 43 41 4c 7d 2c 20 |keyword{|LOCAL}, |
|000031e0| 6f 72 20 5c 6b 65 79 77 | 6f 72 64 7b 55 4e 4b 4e |or \keyw|ord{UNKN|
|000031f0| 4f 57 4e 7d 2e 20 5c 6b | 65 79 77 6f 72 64 7b 41 |OWN}. \k|eyword{A|
|00003200| 4c 4c 7d 20 6d 61 74 63 | 68 65 73 20 61 6e 79 20 |LL} matc|hes any |
|00003210| 68 6f 73 74 2c 0a 77 68 | 69 6c 65 20 5c 6b 65 79 |host,.wh|ile \key|
|00003220| 77 6f 72 64 7b 4c 4f 43 | 41 4c 7d 20 6d 61 74 63 |word{LOC|AL} matc|
|00003230| 68 65 73 20 68 6f 73 74 | 20 6e 61 6d 65 73 20 6e |hes host| names n|
|00003240| 6f 74 20 63 6f 6e 74 61 | 69 6e 69 6e 67 20 61 20 |ot conta|ining a |
|00003250| 64 6f 74 2e 5c 66 6f 6f | 74 6e 6f 74 65 7b 0a 20 |dot.\foo|tnote{. |
|00003260| 55 73 75 61 6c 6c 79 20 | 6f 6e 6c 79 20 6c 6f 63 |Usually |only loc|
|00003270| 61 6c 20 68 6f 73 74 20 | 6e 61 6d 65 73 20 6f 62 |al host |names ob|
|00003280| 74 61 69 6e 65 64 20 66 | 72 6f 6d 20 6c 6f 6f 6b |tained f|rom look|
|00003290| 75 70 73 20 69 6e 20 5c | 66 69 6c 65 7b 2f 65 74 |ups in \|file{/et|
|000032a0| 63 2f 68 6f 73 74 73 7d | 0a 20 63 6f 6e 74 61 69 |c/hosts}|. contai|
|000032b0| 6e 20 6e 6f 20 64 6f 74 | 73 2e 0a 7d 20 5c 6b 65 |n no dot|s..} \ke|
|000032c0| 79 77 6f 72 64 7b 55 4e | 4b 4e 4f 57 4e 7d 20 6d |yword{UN|KNOWN} m|
|000032d0| 61 74 63 68 65 73 20 61 | 6e 79 20 68 6f 73 74 73 |atches a|ny hosts|
|000032e0| 20 77 68 6f 73 65 20 6e | 61 6d 65 20 6f 72 20 61 | whose n|ame or a|
|000032f0| 64 64 72 65 73 73 20 6c | 6f 6f 6b 75 70 20 66 61 |ddress l|ookup fa|
|00003300| 69 6c 65 64 2e 0a 41 20 | 6e 61 6d 65 20 73 74 61 |iled..A |name sta|
|00003310| 72 74 69 6e 67 20 77 69 | 74 68 20 61 20 64 6f 74 |rting wi|th a dot|
|00003320| 20 6d 61 74 63 68 65 73 | 20 61 6c 6c 20 68 6f 73 | matches| all hos|
|00003330| 74 73 20 77 68 6f 73 65 | 20 64 6f 6d 61 69 6e 20 |ts whose| domain |
|00003340| 69 73 20 65 71 75 61 6c | 20 74 6f 20 74 68 69 73 |is equal| to this|
|00003350| 0a 6e 61 6d 65 2e 20 46 | 6f 72 20 65 78 61 6d 70 |.name. F|or examp|
|00003360| 6c 65 2c 20 5c 68 6f 73 | 74 7b 2e 66 6f 6f 62 61 |le, \hos|t{.fooba|
|00003370| 72 2e 63 6f 6d 7d 20 6d | 61 74 63 68 65 73 20 5c |r.com} m|atches \|
|00003380| 68 6f 73 74 7b 62 69 66 | 66 2e 66 6f 6f 62 61 72 |host{bif|f.foobar|
|00003390| 2e 63 6f 6d 7d 2e 0a 54 | 68 65 72 65 20 61 72 65 |.com}..T|here are|
|000033a0| 20 61 6c 73 6f 20 70 72 | 6f 76 69 73 69 6f 6e 73 | also pr|ovisions|
|000033b0| 20 66 6f 72 20 49 50 7e | 6e 65 74 77 6f 72 6b 20 | for IP~|network |
|000033c0| 61 64 64 72 65 73 73 65 | 73 20 61 6e 64 20 73 75 |addresse|s and su|
|000033d0| 62 6e 65 74 20 6e 75 6d | 62 65 72 73 2e 0a 50 6c |bnet num|bers..Pl|
|000033e0| 65 61 73 65 20 72 65 66 | 65 72 20 74 6f 20 74 68 |ease ref|er to th|
|000033f0| 65 20 5c 66 69 6c 65 7b | 68 6f 73 74 73 5c 5f 61 |e \file{|hosts\_a|
|00003400| 63 63 65 73 73 28 35 29 | 7d 20 6d 61 6e 75 61 6c |ccess(5)|} manual|
|00003410| 20 70 61 67 65 20 66 6f | 72 20 64 65 74 61 69 6c | page fo|r detail|
|00003420| 73 2e 0a 0a 0a 54 6f 20 | 64 65 6e 79 20 61 63 63 |s....To |deny acc|
|00003430| 65 73 73 20 74 6f 20 74 | 68 65 20 5c 70 72 6f 67 |ess to t|he \prog|
|00003440| 7b 66 69 6e 67 65 72 7d | 20 61 6e 64 20 5c 70 72 |{finger}| and \pr|
|00003450| 6f 67 7b 74 66 74 70 7d | 20 73 65 72 76 69 63 65 |og{tftp}| service|
|00003460| 73 20 74 6f 20 61 6c 6c | 20 62 75 74 0a 74 68 65 |s to all| but.the|
|00003470| 20 6c 6f 63 61 6c 20 68 | 6f 73 74 73 2c 20 70 75 | local h|osts, pu|
|00003480| 74 20 74 68 65 20 66 6f | 6c 6c 6f 77 69 6e 67 20 |t the fo|llowing |
|00003490| 69 6e 20 5c 66 69 6c 65 | 7b 2f 65 74 63 2f 68 6f |in \file|{/etc/ho|
|000034a0| 73 74 73 2e 64 65 6e 79 | 7d 2c 20 61 6e 64 20 6c |sts.deny|}, and l|
|000034b0| 65 61 76 65 0a 5c 66 69 | 6c 65 7b 2f 65 74 63 2f |eave.\fi|le{/etc/|
|000034c0| 68 6f 73 74 73 2e 61 6c | 6c 6f 77 7d 20 65 6d 70 |hosts.al|low} emp|
|000034d0| 74 79 3a 0a 0a 0a 5c 62 | 65 67 69 6e 7b 74 73 63 |ty:...\b|egin{tsc|
|000034e0| 72 65 65 6e 7d 0a 69 6e | 2e 74 66 74 70 64 2c 20 |reen}.in|.tftpd, |
|000034f0| 69 6e 2e 66 69 6e 67 65 | 72 64 3a 20 41 4c 4c 20 |in.finge|rd: ALL |
|00003500| 45 58 43 45 50 54 20 4c | 4f 43 41 4c 2c 20 5c 76 |EXCEPT L|OCAL, \v|
|00003510| 61 72 7b 2e 79 6f 75 72 | 2e 64 6f 6d 61 69 6e 7d |ar{.your|.domain}|
|00003520| 0a 5c 65 6e 64 7b 74 73 | 63 72 65 65 6e 7d 0a 0a |.\end{ts|creen}..|
|00003530| 0a 54 68 65 20 6f 70 74 | 69 6f 6e 61 6c 20 5c 76 |.The opt|ional \v|
|00003540| 61 72 7b 73 68 65 6c 6c | 63 6d 64 7d 20 66 69 65 |ar{shell|cmd} fie|
|00003550| 6c 64 20 6d 61 79 20 63 | 6f 6e 74 61 69 6e 20 61 |ld may c|ontain a|
|00003560| 20 73 68 65 6c 6c 20 63 | 6f 6d 6d 61 6e 64 0a 74 | shell c|ommand.t|
|00003570| 6f 20 62 65 20 69 6e 76 | 6f 6b 65 64 20 77 68 65 |o be inv|oked whe|
|00003580| 6e 20 74 68 65 20 65 6e | 74 72 79 20 69 73 20 6d |n the en|try is m|
|00003590| 61 74 63 68 65 64 2e 20 | 54 68 69 73 20 69 73 20 |atched. |This is |
|000035a0| 75 73 65 66 75 6c 20 74 | 6f 20 73 65 74 20 75 70 |useful t|o set up|
|000035b0| 0a 74 72 61 70 73 20 74 | 68 61 74 20 6d 61 79 20 |.traps t|hat may |
|000035c0| 65 78 70 6f 73 65 20 70 | 6f 74 65 6e 74 69 61 6c |expose p|otential|
|000035d0| 20 61 74 74 61 63 6b 65 | 72 73 3a 0a 0a 5c 62 65 | attacke|rs:..\be|
|000035e0| 67 69 6e 7b 74 73 63 72 | 65 65 6e 7d 0a 5c 62 65 |gin{tscr|een}.\be|
|000035f0| 67 69 6e 7b 76 65 72 62 | 61 74 69 6d 7d 0a 69 6e |gin{verb|atim}.in|
|00003600| 2e 66 74 70 64 3a 20 41 | 4c 4c 20 45 58 43 45 50 |.ftpd: A|LL EXCEP|
|00003610| 54 20 4c 4f 43 41 4c 2c | 20 2e 76 62 72 65 77 2e |T LOCAL,| .vbrew.|
|00003620| 63 6f 6d 20 3a 20 5c 0a | 20 20 20 20 20 20 65 63 |com : \.| ec|
|00003630| 68 6f 20 22 72 65 71 75 | 65 73 74 20 66 72 6f 6d |ho "requ|est from|
|00003640| 20 25 64 40 25 68 22 20 | 3e 3e 20 2f 76 61 72 2f | %d@%h" |>> /var/|
|00003650| 6c 6f 67 2f 66 69 6e 67 | 65 72 2e 6c 6f 67 3b 20 |log/fing|er.log; |
|00003660| 5c 0a 20 20 20 20 20 20 | 69 66 20 5b 20 25 68 20 |\. |if [ %h |
|00003670| 21 3d 20 22 76 6c 61 67 | 65 72 2e 76 62 72 65 77 |!= "vlag|er.vbrew|
|00003680| 2e 63 6f 6d 22 20 5d 3b | 20 74 68 65 6e 20 5c 0a |.com" ];| then \.|
|00003690| 20 20 20 20 20 20 20 20 | 20 20 66 69 6e 67 65 72 | | finger|
|000036a0| 20 2d 6c 20 40 25 68 20 | 3e 3e 20 2f 76 61 72 2f | -l @%h |>> /var/|
|000036b0| 6c 6f 67 2f 66 69 6e 67 | 65 72 2e 6c 6f 67 20 5c |log/fing|er.log \|
|000036c0| 0a 20 20 20 20 20 20 66 | 69 0a 5c 65 6e 64 7b 76 |. f|i.\end{v|
|000036d0| 65 72 62 61 74 69 6d 7d | 0a 5c 65 6e 64 7b 74 73 |erbatim}|.\end{ts|
|000036e0| 63 72 65 65 6e 7d 0a 0a | 54 68 65 20 5c 6b 65 79 |creen}..|The \key|
|000036f0| 77 6f 72 64 7b 5c 25 68 | 7d 20 61 6e 64 20 5c 6b |word{\%h|} and \k|
|00003700| 65 79 77 6f 72 64 7b 5c | 25 64 7d 20 61 72 67 75 |eyword{\|%d} argu|
|00003710| 6d 65 6e 74 73 20 61 72 | 65 20 65 78 70 61 6e 64 |ments ar|e expand|
|00003720| 65 64 20 62 79 20 5c 70 | 72 6f 67 7b 74 63 70 64 |ed by \p|rog{tcpd|
|00003730| 7d 0a 74 6f 20 74 68 65 | 20 63 6c 69 65 6e 74 20 |}.to the| client |
|00003740| 68 6f 73 74 20 6e 61 6d | 65 20 61 6e 64 20 73 65 |host nam|e and se|
|00003750| 72 76 69 63 65 20 6e 61 | 6d 65 2c 20 72 65 73 70 |rvice na|me, resp|
|00003760| 65 63 74 69 76 65 6c 79 | 2e 20 50 6c 65 61 73 65 |ectively|. Please|
|00003770| 20 72 65 66 65 72 20 74 | 6f 20 74 68 65 0a 5c 66 | refer t|o the.\f|
|00003780| 69 6c 65 7b 68 6f 73 74 | 73 5c 5f 61 63 63 65 73 |ile{host|s\_acces|
|00003790| 73 28 35 29 7d 20 6d 61 | 6e 75 61 6c 20 70 61 67 |s(5)} ma|nual pag|
|000037a0| 65 20 66 6f 72 20 64 65 | 74 61 69 6c 73 2e 0a 0a |e for de|tails...|
|000037b0| 0a 5c 69 6e 64 65 78 7b | 74 63 70 64 40 5c 70 72 |.\index{|tcpd@\pr|
|000037c0| 6f 67 7b 74 63 70 64 7d | 7c 29 7d 0a 5c 69 6e 64 |og{tcpd}||)}.\ind|
|000037d0| 65 78 7b 73 65 72 76 65 | 72 21 69 6e 65 74 64 40 |ex{serve|r!inetd@|
|000037e0| 5c 70 72 6f 67 7b 74 63 | 70 64 7d 7c 29 7d 0a 5c |\prog{tc|pd}|)}.\|
|000037f0| 69 6e 64 65 78 7b 73 65 | 72 76 65 72 21 69 6e 65 |index{se|rver!ine|
|00003800| 74 64 40 5c 70 72 6f 67 | 7b 69 6e 65 74 64 7d 7c |td@\prog|{inetd}||
|00003810| 29 7d 0a 0a 25 5c 65 6e | 64 7b 64 69 73 70 69 74 |)}..%\en|d{dispit|
|00003820| 65 6d 73 7d 0a 0a 5c 73 | 65 63 74 69 6f 6e 7b 54 |ems}..\s|ection{T|
|00003830| 68 65 20 5c 66 69 6c 65 | 7b 73 65 72 76 69 63 65 |he \file|{service|
|00003840| 73 7d 20 61 6e 64 20 5c | 66 69 6c 65 7b 70 72 6f |s} and \|file{pro|
|00003850| 74 6f 63 6f 6c 73 7d 20 | 46 69 6c 65 73 7d 0a 25 |tocols} |Files}.%|
|00003860| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|00003870| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|00003880| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|00003890| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|000038a0| 0a 5c 6e 61 6d 65 64 6c | 61 62 65 6c 7b 61 70 70 |.\namedl|abel{app|
|000038b0| 6c 2e 73 65 72 76 69 63 | 65 73 7d 7b 54 68 65 20 |l.servic|es}{The |
|000038c0| 5c 66 69 6c 65 7b 73 65 | 72 76 69 63 65 73 7d 20 |\file{se|rvices} |
|000038d0| 61 6e 64 20 5c 66 69 6c | 65 7b 70 72 6f 74 6f 63 |and \fil|e{protoc|
|000038e0| 6f 6c 73 7d 20 46 69 6c | 65 73 7d 0a 5c 6e 61 6d |ols} Fil|es}.\nam|
|000038f0| 65 64 6c 61 62 65 6c 7b | 61 70 70 6c 2e 70 72 6f |edlabel{|appl.pro|
|00003900| 74 6f 63 6f 6c 73 7d 7b | 54 68 65 20 5c 66 69 6c |tocols}{|The \fil|
|00003910| 65 7b 73 65 72 76 69 63 | 65 73 7d 20 61 6e 64 20 |e{servic|es} and |
|00003920| 5c 66 69 6c 65 7b 70 72 | 6f 74 6f 63 6f 6c 73 7d |\file{pr|otocols}|
|00003930| 20 46 69 6c 65 73 7d 0a | 5c 69 6e 64 65 78 7b 73 | Files}.|\index{s|
|00003940| 65 72 76 69 63 65 73 40 | 5c 66 69 6c 65 7b 73 65 |ervices@|\file{se|
|00003950| 72 76 69 63 65 73 7d 7c | 28 7d 0a 5c 69 6e 64 65 |rvices}||(}.\inde|
|00003960| 78 7b 70 72 6f 74 6f 63 | 6f 6c 73 40 5c 66 69 6c |x{protoc|ols@\fil|
|00003970| 65 7b 70 72 6f 74 6f 63 | 6f 6c 73 7d 7c 28 7d 0a |e{protoc|ols}|(}.|
|00003980| 5c 69 6e 64 65 78 7b 73 | 65 72 76 69 63 65 73 21 |\index{s|ervices!|
|00003990| 77 65 6c 6c 2d 6b 6e 6f | 77 6e 7d 0a 0a 54 68 65 |well-kno|wn}..The|
|000039a0| 20 70 6f 72 74 20 6e 75 | 6d 62 65 72 73 20 6f 6e | port nu|mbers on|
|000039b0| 20 77 68 69 63 68 20 63 | 65 72 74 61 69 6e 20 60 | which c|ertain `|
|000039c0| 60 73 74 61 6e 64 61 72 | 64 27 27 20 73 65 72 76 |`standar|d'' serv|
|000039d0| 69 63 65 73 20 61 72 65 | 20 6f 66 66 65 72 65 64 |ices are| offered|
|000039e0| 20 61 72 65 0a 64 65 66 | 69 6e 65 64 20 69 6e 20 | are.def|ined in |
|000039f0| 74 68 65 20 60 60 41 73 | 73 69 67 6e 65 64 20 4e |the ``As|signed N|
|00003a00| 75 6d 62 65 72 73 27 27 | 20 52 46 43 2e 20 54 6f |umbers''| RFC. To|
|00003a10| 20 65 6e 61 62 6c 65 20 | 73 65 72 76 65 72 20 61 | enable |server a|
|00003a20| 6e 64 20 63 6c 69 65 6e | 74 0a 70 72 6f 67 72 61 |nd clien|t.progra|
|00003a30| 6d 73 20 74 6f 20 63 6f | 6e 76 65 72 74 20 73 65 |ms to co|nvert se|
|00003a40| 72 76 69 63 65 20 6e 61 | 6d 65 73 20 74 6f 20 74 |rvice na|mes to t|
|00003a50| 68 65 73 65 20 6e 75 6d | 62 65 72 73 2c 20 61 74 |hese num|bers, at|
|00003a60| 20 6c 65 61 73 74 20 61 | 20 70 61 72 74 20 6f 66 | least a| part of|
|00003a70| 0a 74 68 65 20 6c 69 73 | 74 20 69 73 20 6b 65 70 |.the lis|t is kep|
|00003a80| 74 20 6f 6e 20 65 61 63 | 68 20 68 6f 73 74 3b 20 |t on eac|h host; |
|00003a90| 69 74 20 69 73 20 73 74 | 6f 72 65 64 20 69 6e 20 |it is st|ored in |
|00003aa0| 61 20 66 69 6c 65 20 63 | 61 6c 6c 65 64 0a 5c 66 |a file c|alled.\f|
|00003ab0| 69 6c 65 7b 2f 65 74 63 | 2f 73 65 72 76 69 63 65 |ile{/etc|/service|
|00003ac0| 73 7d 2e 20 20 41 6e 20 | 65 6e 74 72 79 20 69 73 |s}. An |entry is|
|00003ad0| 20 6d 61 64 65 20 75 70 | 20 6c 69 6b 65 20 74 68 | made up| like th|
|00003ae0| 69 73 3a 0a 0a 0a 5c 62 | 65 67 69 6e 7b 74 73 63 |is:...\b|egin{tsc|
|00003af0| 72 65 65 6e 7d 0a 5c 76 | 61 72 7b 73 65 72 76 69 |reen}.\v|ar{servi|
|00003b00| 63 65 7d 20 5c 76 61 72 | 7b 70 6f 72 74 7d 2f 5c |ce} \var|{port}/\|
|00003b10| 76 61 72 7b 70 72 6f 74 | 6f 63 6f 6c 7d 20 20 20 |var{prot|ocol} |
|00003b20| 5b 5c 76 61 72 7b 61 6c | 69 61 73 65 73 7d 5d 0a |[\var{al|iases}].|
|00003b30| 5c 65 6e 64 7b 74 73 63 | 72 65 65 6e 7d 0a 0a 0a |\end{tsc|reen}...|
|00003b40| 48 65 72 65 2c 20 5c 76 | 61 72 7b 73 65 72 76 69 |Here, \v|ar{servi|
|00003b50| 63 65 7d 20 73 70 65 63 | 69 66 69 65 73 20 74 68 |ce} spec|ifies th|
|00003b60| 65 20 73 65 72 76 69 63 | 65 20 6e 61 6d 65 2c 20 |e servic|e name, |
|00003b70| 5c 76 61 72 7b 70 6f 72 | 74 7d 20 64 65 66 69 6e |\var{por|t} defin|
|00003b80| 65 73 20 74 68 65 0a 70 | 6f 72 74 20 74 68 65 20 |es the.p|ort the |
|00003b90| 73 65 72 76 69 63 65 20 | 69 73 20 6f 66 66 65 72 |service |is offer|
|00003ba0| 65 64 20 6f 6e 2c 20 61 | 6e 64 20 5c 76 61 72 7b |ed on, a|nd \var{|
|00003bb0| 70 72 6f 74 6f 63 6f 6c | 7d 20 64 65 66 69 6e 65 |protocol|} define|
|00003bc0| 73 20 77 68 69 63 68 0a | 74 72 61 6e 73 70 6f 72 |s which.|transpor|
|00003bd0| 74 20 70 72 6f 74 6f 63 | 6f 6c 20 69 73 20 75 73 |t protoc|ol is us|
|00003be0| 65 64 2e 20 43 6f 6d 6d | 6f 6e 6c 79 2c 20 74 68 |ed. Comm|only, th|
|00003bf0| 69 73 20 69 73 20 65 69 | 74 68 65 72 20 5c 6b 65 |is is ei|ther \ke|
|00003c00| 79 77 6f 72 64 7b 75 64 | 70 7d 20 6f 72 0a 5c 6b |yword{ud|p} or.\k|
|00003c10| 65 79 77 6f 72 64 7b 74 | 63 70 7d 2e 20 49 74 20 |eyword{t|cp}. It |
|00003c20| 69 73 20 70 6f 73 73 69 | 62 6c 65 20 66 6f 72 20 |is possi|ble for |
|00003c30| 61 20 73 65 72 76 69 63 | 65 20 74 6f 20 62 65 20 |a servic|e to be |
|00003c40| 6f 66 66 65 72 65 64 20 | 66 6f 72 20 6d 6f 72 65 |offered |for more|
|00003c50| 0a 74 68 61 6e 20 6f 6e | 65 20 70 72 6f 74 6f 63 |.than on|e protoc|
|00003c60| 6f 6c 2c 20 61 73 20 77 | 65 6c 6c 20 61 73 20 6f |ol, as w|ell as o|
|00003c70| 66 66 65 72 69 6e 67 20 | 64 69 66 66 65 72 65 6e |ffering |differen|
|00003c80| 74 20 73 65 72 76 69 63 | 65 73 20 6f 6e 20 74 68 |t servic|es on th|
|00003c90| 65 20 73 61 6d 65 0a 70 | 6f 72 74 2c 20 61 73 20 |e same.p|ort, as |
|00003ca0| 6c 6f 6e 67 20 61 73 20 | 74 68 65 20 70 72 6f 74 |long as |the prot|
|00003cb0| 6f 63 6f 6c 73 20 61 72 | 65 20 64 69 66 66 65 72 |ocols ar|e differ|
|00003cc0| 65 6e 74 2e 20 54 68 65 | 20 5c 76 61 72 7b 61 6c |ent. The| \var{al|
|00003cd0| 69 61 73 65 73 7d 20 66 | 69 65 6c 64 0a 61 6c 6c |iases} f|ield.all|
|00003ce0| 6f 77 73 20 74 6f 20 73 | 70 65 63 69 66 79 20 61 |ows to s|pecify a|
|00003cf0| 6c 74 65 72 6e 61 74 69 | 76 65 20 6e 61 6d 65 73 |lternati|ve names|
|00003d00| 20 66 6f 72 20 74 68 65 | 20 73 61 6d 65 20 73 65 | for the| same se|
|00003d10| 72 76 69 63 65 2e 0a 0a | 0a 55 73 75 61 6c 6c 79 |rvice...|.Usually|
|00003d20| 2c 20 79 6f 75 20 64 6f | 6e 27 74 20 68 61 76 65 |, you do|n't have|
|00003d30| 20 74 6f 20 63 68 61 6e | 67 65 20 74 68 65 20 73 | to chan|ge the s|
|00003d40| 65 72 76 69 63 65 73 20 | 66 69 6c 65 20 74 68 61 |ervices |file tha|
|00003d50| 74 20 63 6f 6d 65 73 20 | 61 6c 6f 6e 67 0a 77 69 |t comes |along.wi|
|00003d60| 74 68 20 74 68 65 20 6e | 65 74 77 6f 72 6b 20 73 |th the n|etwork s|
|00003d70| 6f 66 74 77 61 72 65 20 | 6f 6e 20 79 6f 75 72 20 |oftware |on your |
|00003d80| 5c 6c 69 6e 75 78 7b 7d | 20 73 79 73 74 65 6d 2e |\linux{}| system.|
|00003d90| 20 4e 65 76 65 72 74 68 | 65 6c 65 73 73 2c 20 77 | Neverth|eless, w|
|00003da0| 65 0a 67 69 76 65 20 61 | 20 73 6d 61 6c 6c 20 65 |e.give a| small e|
|00003db0| 78 63 65 72 70 74 20 66 | 72 6f 6d 20 74 68 61 74 |xcerpt f|rom that|
|00003dc0| 20 66 69 6c 65 20 62 65 | 6c 6f 77 2e 0a 0a 0a 5c | file be|low....\|
|00003dd0| 62 65 67 69 6e 7b 74 73 | 63 72 65 65 6e 7d 0a 5c |begin{ts|creen}.\|
|00003de0| 62 65 67 69 6e 7b 76 65 | 72 62 61 74 69 6d 7d 0a |begin{ve|rbatim}.|
|00003df0| 23 20 54 68 65 20 73 65 | 72 76 69 63 65 73 20 66 |# The se|rvices f|
|00003e00| 69 6c 65 3a 0a 23 0a 23 | 20 77 65 6c 6c 2d 6b 6e |ile:.#.#| well-kn|
|00003e10| 6f 77 6e 20 73 65 72 76 | 69 63 65 73 0a 65 63 68 |own serv|ices.ech|
|00003e20| 6f 20 20 20 20 20 20 20 | 20 20 20 20 37 2f 74 63 |o | 7/tc|
|00003e30| 70 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |p | |
|00003e40| 20 20 23 20 45 63 68 6f | 0a 65 63 68 6f 20 20 20 | # Echo|.echo |
|00003e50| 20 20 20 20 20 20 20 20 | 37 2f 75 64 70 20 20 20 | |7/udp |
|00003e60| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 23 0a | | #.|
|00003e70| 64 69 73 63 61 72 64 20 | 20 20 20 20 20 20 20 39 |discard | 9|
|00003e80| 2f 74 63 70 20 20 73 69 | 6e 6b 20 6e 75 6c 6c 20 |/tcp si|nk null |
|00003e90| 20 20 20 20 20 23 20 44 | 69 73 63 61 72 64 0a 64 | # D|iscard.d|
|00003ea0| 69 73 63 61 72 64 20 20 | 20 20 20 20 20 20 39 2f |iscard | 9/|
|00003eb0| 75 64 70 20 20 73 69 6e | 6b 20 6e 75 6c 6c 20 20 |udp sin|k null |
|00003ec0| 20 20 20 20 23 0a 64 61 | 79 74 69 6d 65 20 20 20 | #.da|ytime |
|00003ed0| 20 20 20 20 31 33 2f 74 | 63 70 20 20 20 20 20 20 | 13/t|cp |
|00003ee0| 20 20 20 20 20 20 20 20 | 20 20 20 23 20 44 61 79 | | # Day|
|00003ef0| 74 69 6d 65 0a 64 61 79 | 74 69 6d 65 20 20 20 20 |time.day|time |
|00003f00| 20 20 20 31 33 2f 75 64 | 70 20 20 20 20 20 20 20 | 13/ud|p |
|00003f10| 20 20 20 20 20 20 20 20 | 20 20 23 0a 63 68 61 72 | | #.char|
|00003f20| 67 65 6e 20 20 20 20 20 | 20 20 31 39 2f 74 63 70 |gen | 19/tcp|
|00003f30| 20 20 74 74 79 74 73 74 | 20 73 6f 75 72 63 65 20 | ttytst| source |
|00003f40| 20 23 20 43 68 61 72 61 | 63 74 65 72 20 47 65 6e | # Chara|cter Gen|
|00003f50| 65 72 61 74 6f 72 0a 63 | 68 61 72 67 65 6e 20 20 |erator.c|hargen |
|00003f60| 20 20 20 20 20 31 39 2f | 75 64 70 20 20 74 74 79 | 19/|udp tty|
|00003f70| 74 73 74 20 73 6f 75 72 | 63 65 20 20 23 0a 66 74 |tst sour|ce #.ft|
|00003f80| 70 2d 64 61 74 61 20 20 | 20 20 20 20 32 30 2f 74 |p-data | 20/t|
|00003f90| 63 70 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |cp | |
|00003fa0| 20 20 20 23 20 46 69 6c | 65 20 54 72 61 6e 73 66 | # Fil|e Transf|
|00003fb0| 65 72 20 50 72 6f 74 6f | 63 6f 6c 20 28 44 61 74 |er Proto|col (Dat|
|00003fc0| 61 29 0a 66 74 70 20 20 | 20 20 20 20 20 20 20 20 |a).ftp | |
|00003fd0| 20 32 31 2f 74 63 70 20 | 20 20 20 20 20 20 20 20 | 21/tcp | |
|00003fe0| 20 20 20 20 20 20 20 20 | 23 20 46 69 6c 65 20 54 | |# File T|
|00003ff0| 72 61 6e 73 66 65 72 20 | 50 72 6f 74 6f 63 6f 6c |ransfer |Protocol|
|00004000| 20 28 43 6f 6e 74 72 6f | 6c 29 0a 74 65 6c 6e 65 | (Contro|l).telne|
|00004010| 74 20 20 20 20 20 20 20 | 20 32 33 2f 74 63 70 20 |t | 23/tcp |
|00004020| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004030| 23 20 56 69 72 74 75 61 | 6c 20 54 65 72 6d 69 6e |# Virtua|l Termin|
|00004040| 61 6c 20 50 72 6f 74 6f | 63 6f 6c 0a 73 6d 74 70 |al Proto|col.smtp|
|00004050| 20 20 20 20 20 20 20 20 | 20 20 32 35 2f 74 63 70 | | 25/tcp|
|00004060| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004070| 20 23 20 53 69 6d 70 6c | 65 20 4d 61 69 6c 20 54 | # Simpl|e Mail T|
|00004080| 72 61 6e 73 66 65 72 20 | 50 72 6f 74 6f 63 6f 6c |ransfer |Protocol|
|00004090| 0a 6e 6e 74 70 20 20 20 | 20 20 20 20 20 20 31 31 |.nntp | 11|
|000040a0| 39 2f 74 63 70 20 20 72 | 65 61 64 6e 65 77 73 20 |9/tcp r|eadnews |
|000040b0| 20 20 20 20 20 20 23 20 | 4e 65 74 77 6f 72 6b 20 | # |Network |
|000040c0| 4e 65 77 73 20 54 72 61 | 6e 73 66 65 72 20 50 72 |News Tra|nsfer Pr|
|000040d0| 6f 74 6f 63 6f 6c 0a 23 | 0a 23 20 55 4e 49 58 20 |otocol.#|.# UNIX |
|000040e0| 73 65 72 76 69 63 65 73 | 0a 65 78 65 63 20 20 20 |services|.exec |
|000040f0| 20 20 20 20 20 20 35 31 | 32 2f 74 63 70 20 20 20 | 51|2/tcp |
|00004100| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 23 20 | | # |
|00004110| 42 53 44 20 72 65 78 65 | 63 64 0a 62 69 66 66 20 |BSD rexe|cd.biff |
|00004120| 20 20 20 20 20 20 20 20 | 35 31 32 2f 75 64 70 20 | |512/udp |
|00004130| 20 63 6f 6d 73 61 74 20 | 20 20 20 20 20 20 20 20 | comsat | |
|00004140| 23 20 6d 61 69 6c 20 6e | 6f 74 69 66 69 63 61 74 |# mail n|otificat|
|00004150| 69 6f 6e 0a 6c 6f 67 69 | 6e 20 20 20 20 20 20 20 |ion.logi|n |
|00004160| 20 35 31 33 2f 74 63 70 | 20 20 20 20 20 20 20 20 | 513/tcp| |
|00004170| 20 20 20 20 20 20 20 20 | 20 23 20 72 65 6d 6f 74 | | # remot|
|00004180| 65 20 6c 6f 67 69 6e 0a | 77 68 6f 20 20 20 20 20 |e login.|who |
|00004190| 20 20 20 20 20 35 31 33 | 2f 75 64 70 20 20 77 68 | 513|/udp wh|
|000041a0| 6f 64 20 20 20 20 20 20 | 20 20 20 20 20 23 20 72 |od | # r|
|000041b0| 65 6d 6f 74 65 20 77 68 | 6f 20 61 6e 64 20 75 70 |emote wh|o and up|
|000041c0| 74 69 6d 65 0a 73 68 65 | 6c 6c 20 20 20 20 20 20 |time.she|ll |
|000041d0| 20 20 35 31 34 2f 74 63 | 70 20 20 63 6d 64 20 20 | 514/tc|p cmd |
|000041e0| 20 20 20 20 20 20 20 20 | 20 20 23 20 72 65 6d 6f | | # remo|
|000041f0| 74 65 20 63 6f 6d 6d 61 | 6e 64 2c 20 6e 6f 20 70 |te comma|nd, no p|
|00004200| 61 73 73 77 64 20 75 73 | 65 64 0a 73 79 73 6c 6f |asswd us|ed.syslo|
|00004210| 67 20 20 20 20 20 20 20 | 35 31 34 2f 75 64 70 20 |g |514/udp |
|00004220| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004230| 23 20 72 65 6d 6f 74 65 | 20 73 79 73 74 65 6d 20 |# remote| system |
|00004240| 6c 6f 67 67 69 6e 67 0a | 70 72 69 6e 74 65 72 20 |logging.|printer |
|00004250| 20 20 20 20 20 35 31 35 | 2f 74 63 70 20 20 73 70 | 515|/tcp sp|
|00004260| 6f 6f 6c 65 72 20 20 20 | 20 20 20 20 20 23 20 72 |ooler | # r|
|00004270| 65 6d 6f 74 65 20 70 72 | 69 6e 74 20 73 70 6f 6f |emote pr|int spoo|
|00004280| 6c 69 6e 67 0a 72 6f 75 | 74 65 20 20 20 20 20 20 |ling.rou|te |
|00004290| 20 20 35 32 30 2f 75 64 | 70 20 20 72 6f 75 74 65 | 520/ud|p route|
|000042a0| 72 20 72 6f 75 74 65 64 | 20 20 23 20 72 6f 75 74 |r routed| # rout|
|000042b0| 69 6e 67 20 69 6e 66 6f | 72 6d 61 74 69 6f 6e 20 |ing info|rmation |
|000042c0| 70 72 6f 74 6f 63 6f 6c | 0a 5c 65 6e 64 7b 76 65 |protocol|.\end{ve|
|000042d0| 72 62 61 74 69 6d 7d 0a | 5c 65 6e 64 7b 74 73 63 |rbatim}.|\end{tsc|
|000042e0| 72 65 65 6e 7d 0a 0a 0a | 4e 6f 74 65 20 74 68 61 |reen}...|Note tha|
|000042f0| 74 2c 20 66 6f 72 20 65 | 78 61 6d 70 6c 65 2c 20 |t, for e|xample, |
|00004300| 74 68 65 20 5c 70 72 6f | 67 7b 65 63 68 6f 7d 20 |the \pro|g{echo} |
|00004310| 73 65 72 76 69 63 65 20 | 69 73 20 6f 66 66 65 72 |service |is offer|
|00004320| 65 64 20 6f 6e 0a 70 6f | 72 74 20 37 20 66 6f 72 |ed on.po|rt 7 for|
|00004330| 20 62 6f 74 68 20 54 43 | 50 20 61 6e 64 20 55 44 | both TC|P and UD|
|00004340| 50 2c 20 61 6e 64 20 74 | 68 61 74 20 70 6f 72 74 |P, and t|hat port|
|00004350| 20 35 31 32 20 69 73 20 | 75 73 65 64 20 66 6f 72 | 512 is |used for|
|00004360| 20 74 77 6f 20 64 69 66 | 66 65 72 65 6e 74 0a 73 | two dif|ferent.s|
|00004370| 65 72 76 69 63 65 73 2c | 20 6e 61 6d 65 6c 79 20 |ervices,| namely |
|00004380| 74 68 65 20 43 4f 4d 53 | 41 54 20 64 61 65 6d 6f |the COMS|AT daemo|
|00004390| 6e 20 28 77 68 69 63 68 | 20 6e 6f 74 69 66 69 65 |n (which| notifie|
|000043a0| 73 20 75 73 65 72 73 20 | 6f 66 20 6e 65 77 6c 79 |s users |of newly|
|000043b0| 0a 61 72 72 69 76 65 64 | 20 6d 61 69 6c 2c 20 73 |.arrived| mail, s|
|000043c0| 65 65 20 5c 70 72 6f 67 | 7b 78 62 69 66 66 28 31 |ee \prog|{xbiff(1|
|000043d0| 78 29 7d 29 2c 20 6f 76 | 65 72 20 55 44 50 2c 20 |x)}), ov|er UDP, |
|000043e0| 61 6e 64 20 66 6f 72 20 | 72 65 6d 6f 74 65 0a 65 |and for |remote.e|
|000043f0| 78 65 63 75 74 69 6f 6e | 20 28 5c 70 72 6f 67 7b |xecution| (\prog{|
|00004400| 72 65 78 65 63 28 31 29 | 7d 29 2c 20 75 73 69 6e |rexec(1)|}), usin|
|00004410| 67 20 54 43 50 2e 0a 0a | 0a 5c 69 6e 64 65 78 7b |g TCP...|.\index{|
|00004420| 70 72 6f 74 6f 63 6f 6c | 20 6e 75 6d 62 65 72 73 |protocol| numbers|
|00004430| 7d 0a 53 69 6d 69 6c 61 | 72 20 74 6f 20 74 68 65 |}.Simila|r to the|
|00004440| 20 73 65 72 76 69 63 65 | 73 20 66 69 6c 65 2c 20 | service|s file, |
|00004450| 74 68 65 20 6e 65 74 77 | 6f 72 6b 69 6e 67 20 6c |the netw|orking l|
|00004460| 69 62 72 61 72 79 20 6e | 65 65 64 73 20 61 20 77 |ibrary n|eeds a w|
|00004470| 61 79 20 74 6f 0a 74 72 | 61 6e 73 6c 61 74 65 20 |ay to.tr|anslate |
|00004480| 70 72 6f 74 6f 63 6f 6c | 20 6e 61 6d 65 73 7e 2d |protocol| names~-|
|00004490| 2d 2d 20 66 6f 72 20 65 | 78 61 6d 70 6c 65 2c 20 |-- for e|xample, |
|000044a0| 74 68 6f 73 65 20 75 73 | 65 64 20 69 6e 20 74 68 |those us|ed in th|
|000044b0| 65 20 73 65 72 76 69 63 | 65 73 0a 66 69 6c 65 7e |e servic|es.file~|
|000044c0| 2d 2d 2d 20 74 6f 20 70 | 72 6f 74 6f 63 6f 6c 20 |--- to p|rotocol |
|000044d0| 6e 75 6d 62 65 72 73 20 | 75 6e 64 65 72 73 74 6f |numbers |understo|
|000044e0| 6f 64 20 62 79 20 74 68 | 65 20 49 50 20 6c 61 79 |od by th|e IP lay|
|000044f0| 65 72 20 6f 6e 20 6f 74 | 68 65 72 20 68 6f 73 74 |er on ot|her host|
|00004500| 73 2e 0a 54 68 69 73 20 | 69 73 20 64 6f 6e 65 20 |s..This |is done |
|00004510| 62 79 20 6c 6f 6f 6b 69 | 6e 67 20 75 70 20 74 68 |by looki|ng up th|
|00004520| 65 20 6e 61 6d 65 20 69 | 6e 20 74 68 65 20 5c 66 |e name i|n the \f|
|00004530| 69 6c 65 7b 2f 65 74 63 | 2f 70 72 6f 74 6f 63 6f |ile{/etc|/protoco|
|00004540| 6c 73 7d 20 66 69 6c 65 | 2e 0a 49 74 20 63 6f 6e |ls} file|..It con|
|00004550| 74 61 69 6e 73 20 6f 6e | 65 20 65 6e 74 72 79 20 |tains on|e entry |
|00004560| 70 65 72 20 6c 69 6e 65 | 2c 20 65 61 63 68 20 63 |per line|, each c|
|00004570| 6f 6e 74 61 69 6e 69 6e | 67 20 61 20 70 72 6f 74 |ontainin|g a prot|
|00004580| 6f 63 6f 6c 20 6e 61 6d | 65 2c 20 61 6e 64 20 74 |ocol nam|e, and t|
|00004590| 68 65 0a 61 73 73 6f 63 | 69 61 74 65 64 20 6e 75 |he.assoc|iated nu|
|000045a0| 6d 62 65 72 2e 20 48 61 | 76 69 6e 67 20 74 6f 20 |mber. Ha|ving to |
|000045b0| 74 6f 75 63 68 20 74 68 | 69 73 20 66 69 6c 65 20 |touch th|is file |
|000045c0| 69 73 20 65 76 65 6e 20 | 6d 6f 72 65 20 75 6e 6c |is even |more unl|
|000045d0| 69 6b 65 6c 79 20 74 68 | 61 6e 0a 68 61 76 69 6e |ikely th|an.havin|
|000045e0| 67 20 74 6f 20 6d 65 64 | 64 6c 65 20 77 69 74 68 |g to med|dle with|
|000045f0| 20 5c 66 69 6c 65 7b 2f | 65 74 63 2f 73 65 72 76 | \file{/|etc/serv|
|00004600| 69 63 65 73 7d 2e 20 41 | 20 73 61 6d 70 6c 65 20 |ices}. A| sample |
|00004610| 66 69 6c 65 20 69 73 20 | 67 69 76 65 6e 20 0a 62 |file is |given .b|
|00004620| 65 6c 6f 77 3a 0a 0a 0a | 5c 62 65 67 69 6e 7b 74 |elow:...|\begin{t|
|00004630| 73 63 72 65 65 6e 7d 0a | 5c 62 65 67 69 6e 7b 76 |screen}.|\begin{v|
|00004640| 65 72 62 61 74 69 6d 7d | 0a 23 0a 23 20 49 6e 74 |erbatim}|.#.# Int|
|00004650| 65 72 6e 65 74 20 28 49 | 50 29 20 70 72 6f 74 6f |ernet (I|P) proto|
|00004660| 63 6f 6c 73 0a 23 0a 69 | 70 20 20 20 20 20 20 30 |cols.#.i|p 0|
|00004670| 20 20 20 20 20 20 20 49 | 50 20 20 20 20 20 20 20 | I|P |
|00004680| 20 20 20 20 20 20 20 23 | 20 69 6e 74 65 72 6e 65 | #| interne|
|00004690| 74 20 70 72 6f 74 6f 63 | 6f 6c 2c 20 70 73 65 75 |t protoc|ol, pseu|
|000046a0| 64 6f 20 70 72 6f 74 6f | 63 6f 6c 20 6e 75 6d 62 |do proto|col numb|
|000046b0| 65 72 0a 69 63 6d 70 20 | 20 20 20 31 20 20 20 20 |er.icmp | 1 |
|000046c0| 20 20 20 49 43 4d 50 20 | 20 20 20 20 20 20 20 20 | ICMP | |
|000046d0| 20 20 20 23 20 69 6e 74 | 65 72 6e 65 74 20 63 6f | # int|ernet co|
|000046e0| 6e 74 72 6f 6c 20 6d 65 | 73 73 61 67 65 20 70 72 |ntrol me|ssage pr|
|000046f0| 6f 74 6f 63 6f 6c 0a 69 | 67 6d 70 20 20 20 20 32 |otocol.i|gmp 2|
|00004700| 20 20 20 20 20 20 20 49 | 47 4d 50 20 20 20 20 20 | I|GMP |
|00004710| 20 20 20 20 20 20 20 23 | 20 69 6e 74 65 72 6e 65 | #| interne|
|00004720| 74 20 67 72 6f 75 70 20 | 6d 75 6c 74 69 63 61 73 |t group |multicas|
|00004730| 74 20 70 72 6f 74 6f 63 | 6f 6c 0a 74 63 70 20 20 |t protoc|ol.tcp |
|00004740| 20 20 20 36 20 20 20 20 | 20 20 20 54 43 50 20 20 | 6 | TCP |
|00004750| 20 20 20 20 20 20 20 20 | 20 20 20 23 20 74 72 61 | | # tra|
|00004760| 6e 73 6d 69 73 73 69 6f | 6e 20 63 6f 6e 74 72 6f |nsmissio|n contro|
|00004770| 6c 20 70 72 6f 74 6f 63 | 6f 6c 0a 75 64 70 20 20 |l protoc|ol.udp |
|00004780| 20 20 20 31 37 20 20 20 | 20 20 20 55 44 50 20 20 | 17 | UDP |
|00004790| 20 20 20 20 20 20 20 20 | 20 20 20 23 20 75 73 65 | | # use|
|000047a0| 72 20 64 61 74 61 67 72 | 61 6d 20 70 72 6f 74 6f |r datagr|am proto|
|000047b0| 63 6f 6c 0a 72 61 77 20 | 20 20 20 20 32 35 35 20 |col.raw | 255 |
|000047c0| 20 20 20 20 52 41 57 20 | 20 20 20 20 20 20 20 20 | RAW | |
|000047d0| 20 20 20 20 23 20 52 41 | 57 20 49 50 20 69 6e 74 | # RA|W IP int|
|000047e0| 65 72 66 61 63 65 0a 5c | 65 6e 64 7b 76 65 72 62 |erface.\|end{verb|
|000047f0| 61 74 69 6d 7d 0a 5c 65 | 6e 64 7b 74 73 63 72 65 |atim}.\e|nd{tscre|
|00004800| 65 6e 7d 0a 0a 5c 69 6e | 64 65 78 7b 73 65 72 76 |en}..\in|dex{serv|
|00004810| 69 63 65 73 40 5c 66 69 | 6c 65 7b 73 65 72 76 69 |ices@\fi|le{servi|
|00004820| 63 65 73 7d 7c 29 7d 0a | 5c 69 6e 64 65 78 7b 70 |ces}|)}.|\index{p|
|00004830| 72 6f 74 6f 63 6f 6c 73 | 40 5c 66 69 6c 65 7b 70 |rotocols|@\file{p|
|00004840| 72 6f 74 6f 63 6f 6c 73 | 7d 7c 29 7d 0a 0a 0a 5c |rotocols|}|)}...\|
|00004850| 73 65 63 74 69 6f 6e 7b | 52 65 6d 6f 74 65 20 50 |section{|Remote P|
|00004860| 72 6f 63 65 64 75 72 65 | 20 43 61 6c 6c 7d 0a 25 |rocedure| Call}.%|
|00004870| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|00004880| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|00004890| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|000048a0| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|000048b0| 0a 5c 6e 61 6d 65 64 6c | 61 62 65 6c 7b 61 70 70 |.\namedl|abel{app|
|000048c0| 6c 2e 72 70 63 7d 7b 52 | 65 6d 6f 74 65 20 50 72 |l.rpc}{R|emote Pr|
|000048d0| 6f 63 65 64 75 72 65 20 | 43 61 6c 6c 7d 0a 5c 69 |ocedure |Call}.\i|
|000048e0| 6e 64 65 78 7b 52 65 6d | 6f 74 65 20 50 72 6f 63 |ndex{Rem|ote Proc|
|000048f0| 65 64 75 72 65 20 43 61 | 6c 6c 7c 28 7d 0a 5c 69 |edure Ca|ll|(}.\i|
|00004900| 6e 64 65 78 7b 52 50 43 | 7c 73 65 65 20 7b 52 65 |ndex{RPC||see {Re|
|00004910| 6d 6f 74 65 20 50 72 6f | 63 65 64 75 72 65 20 43 |mote Pro|cedure C|
|00004920| 61 6c 6c 7d 7d 0a 0a 41 | 20 76 65 72 79 20 67 65 |all}}..A| very ge|
|00004930| 6e 65 72 61 6c 20 6d 65 | 63 68 61 6e 69 73 6d 20 |neral me|chanism |
|00004940| 66 6f 72 20 63 6c 69 65 | 6e 74 2d 73 65 72 76 65 |for clie|nt-serve|
|00004950| 72 20 61 70 70 6c 69 63 | 61 74 69 6f 6e 73 20 69 |r applic|ations i|
|00004960| 73 20 70 72 6f 76 69 64 | 65 64 20 62 79 0a 52 50 |s provid|ed by.RP|
|00004970| 43 2c 20 74 68 65 20 5c | 65 6d 70 68 7b 52 65 6d |C, the \|emph{Rem|
|00004980| 6f 74 65 20 50 72 6f 63 | 65 64 75 72 65 20 43 61 |ote Proc|edure Ca|
|00004990| 6c 6c 7d 20 70 61 63 6b | 61 67 65 2e 20 52 50 43 |ll} pack|age. RPC|
|000049a0| 20 77 61 73 20 64 65 76 | 65 6c 6f 70 65 64 20 62 | was dev|eloped b|
|000049b0| 79 20 53 75 6e 0a 4d 69 | 63 72 73 79 73 74 65 6d |y Sun.Mi|crsystem|
|000049c0| 73 2c 20 61 6e 64 20 69 | 73 20 61 20 63 6f 6c 6c |s, and i|s a coll|
|000049d0| 65 63 74 69 6f 6e 20 6f | 66 20 74 6f 6f 6c 73 20 |ection o|f tools |
|000049e0| 61 6e 64 20 6c 69 62 72 | 61 72 79 20 66 75 6e 63 |and libr|ary func|
|000049f0| 74 69 6f 6e 73 2e 0a 49 | 6d 70 6f 72 74 61 6e 74 |tions..I|mportant|
|00004a00| 20 61 70 70 6c 69 63 61 | 74 69 6f 6e 73 20 62 75 | applica|tions bu|
|00004a10| 69 6c 74 20 6f 6e 20 74 | 6f 70 20 6f 66 20 52 50 |ilt on t|op of RP|
|00004a20| 43 20 61 72 65 20 4e 46 | 53 2c 20 74 68 65 20 4e |C are NF|S, the N|
|00004a30| 65 74 77 6f 72 6b 0a 46 | 69 6c 65 73 79 73 74 65 |etwork.F|ilesyste|
|00004a40| 6d 2c 20 61 6e 64 20 4e | 49 53 2c 20 74 68 65 20 |m, and N|IS, the |
|00004a50| 4e 65 74 77 6f 72 6b 20 | 49 6e 66 6f 72 6d 61 74 |Network |Informat|
|00004a60| 69 6f 6e 20 53 79 73 74 | 65 6d 2c 20 62 6f 74 68 |ion Syst|em, both|
|00004a70| 20 6f 66 20 77 68 69 63 | 68 20 77 69 6c 6c 0a 62 | of whic|h will.b|
|00004a80| 65 20 69 6e 74 72 6f 64 | 75 63 65 64 20 69 6e 20 |e introd|uced in |
|00004a90| 6c 61 74 65 72 20 63 68 | 61 70 74 65 72 73 2e 0a |later ch|apters..|
|00004aa0| 0a 0a 5c 69 6e 64 65 78 | 7b 45 78 74 65 72 6e 61 |..\index|{Externa|
|00004ab0| 6c 20 44 61 74 61 20 52 | 65 70 72 65 73 65 6e 74 |l Data R|epresent|
|00004ac0| 61 74 69 6f 6e 7d 0a 5c | 69 6e 64 65 78 7b 58 44 |ation}.\|index{XD|
|00004ad0| 52 7c 73 65 65 20 7b 45 | 78 74 65 72 6e 61 6c 20 |R|see {E|xternal |
|00004ae0| 44 61 74 61 20 52 65 70 | 72 65 73 65 6e 74 61 74 |Data Rep|resentat|
|00004af0| 69 6f 6e 7d 7d 0a 41 6e | 20 52 50 43 20 73 65 72 |ion}}.An| RPC ser|
|00004b00| 76 65 72 20 63 6f 6e 73 | 69 73 74 73 20 6f 66 20 |ver cons|ists of |
|00004b10| 61 20 63 6f 6c 6c 65 63 | 74 69 6f 6e 20 6f 66 20 |a collec|tion of |
|00004b20| 70 72 6f 63 65 64 75 72 | 65 73 20 74 68 61 74 20 |procedur|es that |
|00004b30| 63 6c 69 65 6e 74 20 6d | 61 79 0a 63 61 6c 6c 20 |client m|ay.call |
|00004b40| 62 79 20 73 65 6e 64 69 | 6e 67 20 61 6e 20 52 50 |by sendi|ng an RP|
|00004b50| 43 20 72 65 71 75 65 73 | 74 20 74 6f 20 74 68 65 |C reques|t to the|
|00004b60| 20 73 65 72 76 65 72 2c | 20 61 6c 6f 6e 67 20 77 | server,| along w|
|00004b70| 69 74 68 20 74 68 65 20 | 70 72 6f 63 65 64 75 72 |ith the |procedur|
|00004b80| 65 0a 70 61 72 61 6d 65 | 74 65 72 73 2e 20 54 68 |e.parame|ters. Th|
|00004b90| 65 20 73 65 72 76 65 72 | 20 77 69 6c 6c 20 69 6e |e server| will in|
|00004ba0| 76 6f 6b 65 20 74 68 65 | 20 69 6e 64 69 63 61 74 |voke the| indicat|
|00004bb0| 65 64 20 70 72 6f 63 65 | 64 75 72 65 20 6f 6e 20 |ed proce|dure on |
|00004bc0| 62 65 68 61 6c 66 20 6f | 66 0a 74 68 65 20 63 6c |behalf o|f.the cl|
|00004bd0| 69 65 6e 74 2c 20 68 61 | 6e 64 69 6e 67 20 62 61 |ient, ha|nding ba|
|00004be0| 63 6b 20 74 68 65 20 72 | 65 74 75 72 6e 20 76 61 |ck the r|eturn va|
|00004bf0| 6c 75 65 2c 20 69 66 20 | 74 68 65 72 65 20 69 73 |lue, if |there is|
|00004c00| 20 61 6e 79 2e 20 20 49 | 6e 20 6f 72 64 65 72 20 | any. I|n order |
|00004c10| 74 6f 0a 62 65 20 6d 61 | 63 68 69 6e 65 2d 69 6e |to.be ma|chine-in|
|00004c20| 64 65 70 65 6e 64 65 6e | 74 2c 20 61 6c 6c 20 64 |dependen|t, all d|
|00004c30| 61 74 61 20 65 78 63 68 | 61 6e 67 65 64 20 62 65 |ata exch|anged be|
|00004c40| 74 77 65 65 6e 20 63 6c | 69 65 6e 74 20 61 6e 64 |tween cl|ient and|
|00004c50| 20 73 65 72 76 65 72 20 | 69 73 0a 63 6f 6e 76 65 | server |is.conve|
|00004c60| 72 74 65 64 20 74 6f 20 | 61 20 73 6f 2d 63 61 6c |rted to |a so-cal|
|00004c70| 6c 65 64 20 5c 65 6d 70 | 68 7b 45 78 74 65 72 6e |led \emp|h{Extern|
|00004c80| 61 6c 20 44 61 74 61 20 | 52 65 70 72 65 73 65 6e |al Data |Represen|
|00004c90| 74 61 74 69 6f 6e 7d 20 | 66 6f 72 6d 61 74 20 28 |tation} |format (|
|00004ca0| 58 44 52 29 0a 62 79 20 | 74 68 65 20 73 65 6e 64 |XDR).by |the send|
|00004cb0| 65 72 2c 20 61 6e 64 20 | 63 6f 6e 76 65 72 74 65 |er, and |converte|
|00004cc0| 64 20 62 61 63 6b 20 74 | 6f 20 74 68 65 20 6d 61 |d back t|o the ma|
|00004cd0| 63 68 69 6e 65 2d 6c 6f | 63 61 6c 20 72 65 70 72 |chine-lo|cal repr|
|00004ce0| 65 73 65 6e 74 61 74 69 | 6f 6e 20 62 79 0a 74 68 |esentati|on by.th|
|00004cf0| 65 20 72 65 63 65 69 76 | 65 72 2e 0a 0a 0a 53 6f |e receiv|er....So|
|00004d00| 6d 65 74 69 6d 65 73 2c | 20 69 6d 70 72 6f 76 65 |metimes,| improve|
|00004d10| 6d 65 6e 74 73 20 74 6f | 20 61 6e 20 52 50 43 20 |ments to| an RPC |
|00004d20| 61 70 70 6c 69 63 61 74 | 69 6f 6e 20 69 6e 74 72 |applicat|ion intr|
|00004d30| 6f 64 75 63 65 20 69 6e | 63 6f 6d 70 61 74 69 62 |oduce in|compatib|
|00004d40| 6c 65 0a 63 68 61 6e 67 | 65 73 20 69 6e 20 74 68 |le.chang|es in th|
|00004d50| 65 20 70 72 6f 63 65 64 | 75 72 65 20 63 61 6c 6c |e proced|ure call|
|00004d60| 20 69 6e 74 65 72 66 61 | 63 65 2e 20 4f 66 20 63 | interfa|ce. Of c|
|00004d70| 6f 75 72 73 65 2c 20 73 | 69 6d 70 6c 79 20 63 68 |ourse, s|imply ch|
|00004d80| 61 6e 67 69 6e 67 20 74 | 68 65 0a 73 65 72 76 65 |anging t|he.serve|
|00004d90| 72 20 77 6f 75 6c 64 20 | 63 72 61 73 68 20 61 6c |r would |crash al|
|00004da0| 6c 20 61 70 70 6c 69 63 | 61 74 69 6f 6e 20 74 68 |l applic|ation th|
|00004db0| 61 74 20 73 74 69 6c 6c | 20 65 78 70 65 63 74 20 |at still| expect |
|00004dc0| 74 68 65 20 6f 72 69 67 | 69 6e 61 6c 0a 62 65 68 |the orig|inal.beh|
|00004dd0| 61 76 69 6f 72 2e 20 20 | 54 68 65 72 65 66 6f 72 |avior. |Therefor|
|00004de0| 65 2c 20 52 50 43 20 70 | 72 6f 67 72 61 6d 73 20 |e, RPC p|rograms |
|00004df0| 68 61 76 65 20 76 65 72 | 73 69 6f 6e 20 6e 75 6d |have ver|sion num|
|00004e00| 62 65 72 73 20 61 73 73 | 69 67 6e 65 64 20 74 6f |bers ass|igned to|
|00004e10| 0a 74 68 65 6d 2c 20 75 | 73 75 61 6c 6c 79 20 73 |.them, u|sually s|
|00004e20| 74 61 72 74 69 6e 67 20 | 77 69 74 68 7e 31 2c 20 |tarting |with~1, |
|00004e30| 61 6e 64 20 77 69 74 68 | 20 65 61 63 68 20 6e 65 |and with| each ne|
|00004e40| 77 20 76 65 72 73 69 6f | 6e 20 6f 66 20 74 68 65 |w versio|n of the|
|00004e50| 20 52 50 43 0a 69 6e 74 | 65 72 66 61 63 65 20 74 | RPC.int|erface t|
|00004e60| 68 69 73 20 63 6f 75 6e | 74 65 72 20 77 69 6c 6c |his coun|ter will|
|00004e70| 20 62 65 20 62 75 6d 70 | 65 64 2e 20 4f 66 74 65 | be bump|ed. Ofte|
|00004e80| 6e 2c 20 61 20 73 65 72 | 76 65 72 20 6d 61 79 20 |n, a ser|ver may |
|00004e90| 6f 66 66 65 72 20 73 65 | 76 65 72 61 6c 0a 76 65 |offer se|veral.ve|
|00004ea0| 72 73 69 6f 6e 73 20 73 | 69 6d 75 6c 74 61 6e 65 |rsions s|imultane|
|00004eb0| 6f 75 73 6c 79 3b 20 63 | 6c 69 65 6e 74 73 20 74 |ously; c|lients t|
|00004ec0| 68 65 6e 20 69 6e 64 69 | 63 61 74 65 20 62 79 20 |hen indi|cate by |
|00004ed0| 74 68 65 20 76 65 72 73 | 69 6f 6e 20 6e 75 6d 62 |the vers|ion numb|
|00004ee0| 65 72 20 69 6e 0a 74 68 | 65 69 72 20 72 65 71 75 |er in.th|eir requ|
|00004ef0| 65 73 74 73 20 77 68 69 | 63 68 20 69 6d 70 6c 65 |ests whi|ch imple|
|00004f00| 6d 65 6e 74 61 74 69 6f | 6e 20 6f 66 20 74 68 65 |mentatio|n of the|
|00004f10| 20 73 65 72 76 69 63 65 | 20 74 68 65 79 20 77 61 | service| they wa|
|00004f20| 6e 74 20 74 6f 20 75 73 | 65 2e 0a 0a 0a 5c 69 6e |nt to us|e....\in|
|00004f30| 64 65 78 7b 72 70 63 40 | 5c 66 69 6c 65 7b 72 70 |dex{rpc@|\file{rp|
|00004f40| 63 7d 7d 0a 5c 69 6e 64 | 65 78 7b 52 65 6d 6f 74 |c}}.\ind|ex{Remot|
|00004f50| 65 20 50 72 6f 63 65 64 | 75 72 65 20 43 61 6c 6c |e Proced|ure Call|
|00004f60| 21 70 72 6f 67 72 61 6d | 20 6e 75 6d 62 65 72 73 |!program| numbers|
|00004f70| 7d 0a 54 68 65 20 6e 65 | 74 77 6f 72 6b 20 63 6f |}.The ne|twork co|
|00004f80| 6d 6d 75 6e 69 63 61 74 | 69 6f 6e 20 62 65 74 77 |mmunicat|ion betw|
|00004f90| 65 65 6e 20 52 50 43 20 | 73 65 72 76 65 72 73 20 |een RPC |servers |
|00004fa0| 61 6e 64 20 63 6c 69 65 | 6e 74 73 20 69 73 20 73 |and clie|nts is s|
|00004fb0| 6f 6d 65 77 68 61 74 0a | 70 65 63 75 6c 69 61 72 |omewhat.|peculiar|
|00004fc0| 2e 20 41 6e 20 52 50 43 | 20 73 65 72 76 65 72 20 |. An RPC| server |
|00004fd0| 6f 66 66 65 72 73 20 6f | 6e 65 20 6f 72 20 6d 6f |offers o|ne or mo|
|00004fe0| 72 65 20 63 6f 6c 6c 65 | 63 74 69 6f 6e 73 20 6f |re colle|ctions o|
|00004ff0| 66 20 70 72 6f 63 65 64 | 75 72 65 73 3b 0a 65 61 |f proced|ures;.ea|
|00005000| 63 68 20 73 65 74 20 69 | 73 20 62 65 69 6e 67 20 |ch set i|s being |
|00005010| 63 61 6c 6c 65 64 20 61 | 20 5c 65 6d 70 68 7b 70 |called a| \emph{p|
|00005020| 72 6f 67 72 61 6d 7d 2c | 20 61 6e 64 20 69 73 20 |rogram},| and is |
|00005030| 75 6e 69 71 75 65 6c 79 | 20 69 64 65 6e 74 69 66 |uniquely| identif|
|00005040| 69 65 64 0a 62 79 20 61 | 20 5c 65 6d 70 68 7b 70 |ied.by a| \emph{p|
|00005050| 72 6f 67 72 61 6d 20 6e | 75 6d 62 65 72 7d 2e 20 |rogram n|umber}. |
|00005060| 41 20 6c 69 73 74 20 6d | 61 70 70 69 6e 67 20 73 |A list m|apping s|
|00005070| 65 72 76 69 63 65 20 6e | 61 6d 65 73 20 74 6f 20 |ervice n|ames to |
|00005080| 70 72 6f 67 72 61 6d 20 | 6e 75 6d 62 65 72 73 0a |program |numbers.|
|00005090| 69 73 20 75 73 75 61 6c | 6c 79 20 6b 65 70 74 20 |is usual|ly kept |
|000050a0| 69 6e 20 5c 66 69 6c 65 | 7b 2f 65 74 63 2f 72 70 |in \file|{/etc/rp|
|000050b0| 63 7d 2c 20 61 6e 20 65 | 78 63 65 72 70 74 20 6f |c}, an e|xcerpt o|
|000050c0| 66 20 77 68 69 63 68 20 | 69 73 20 72 65 70 72 6f |f which |is repro|
|000050d0| 64 75 63 65 64 20 62 65 | 6c 6f 77 0a 69 6e 20 66 |duced be|low.in f|
|000050e0| 69 67 75 72 65 7e 5c 72 | 65 66 7b 72 70 63 2e 66 |igure~\r|ef{rpc.f|
|000050f0| 69 67 7d 2e 0a 0a 0a 5c | 62 65 67 69 6e 7b 66 69 |ig}....\|begin{fi|
|00005100| 67 75 72 65 7d 5b 68 74 | 62 70 5d 0a 5c 62 65 67 |gure}[ht|bp].\beg|
|00005110| 69 6e 7b 74 73 63 72 65 | 65 6e 7d 0a 5c 62 65 67 |in{tscre|en}.\beg|
|00005120| 69 6e 7b 76 65 72 62 61 | 74 69 6d 7d 0a 23 0a 23 |in{verba|tim}.#.#|
|00005130| 20 2f 65 74 63 2f 72 70 | 63 20 2d 20 6d 69 73 63 | /etc/rp|c - misc|
|00005140| 65 6c 6c 61 65 6e 6f 75 | 73 20 52 50 43 2d 62 61 |ellaenou|s RPC-ba|
|00005150| 73 65 64 20 73 65 72 76 | 69 63 65 73 0a 23 0a 70 |sed serv|ices.#.p|
|00005160| 6f 72 74 6d 61 70 70 65 | 72 20 20 20 20 20 20 31 |ortmappe|r 1|
|00005170| 30 30 30 30 30 20 20 70 | 6f 72 74 6d 61 70 20 73 |00000 p|ortmap s|
|00005180| 75 6e 72 70 63 0a 72 73 | 74 61 74 64 20 20 20 20 |unrpc.rs|tatd |
|00005190| 20 20 20 20 20 20 31 30 | 30 30 30 31 20 20 72 73 | 10|0001 rs|
|000051a0| 74 61 74 20 72 73 74 61 | 74 5f 73 76 63 20 72 75 |tat rsta|t_svc ru|
|000051b0| 70 20 70 65 72 66 6d 65 | 74 65 72 0a 72 75 73 65 |p perfme|ter.ruse|
|000051c0| 72 73 64 20 20 20 20 20 | 20 20 20 20 31 30 30 30 |rsd | 1000|
|000051d0| 30 32 20 20 72 75 73 65 | 72 73 0a 6e 66 73 20 20 |02 ruse|rs.nfs |
|000051e0| 20 20 20 20 20 20 20 20 | 20 20 20 31 30 30 30 30 | | 10000|
|000051f0| 33 20 20 6e 66 73 70 72 | 6f 67 0a 79 70 73 65 72 |3 nfspr|og.ypser|
|00005200| 76 20 20 20 20 20 20 20 | 20 20 20 31 30 30 30 30 |v | 10000|
|00005210| 34 20 20 79 70 70 72 6f | 67 0a 6d 6f 75 6e 74 64 |4 yppro|g.mountd|
|00005220| 20 20 20 20 20 20 20 20 | 20 20 31 30 30 30 30 35 | | 100005|
|00005230| 20 20 6d 6f 75 6e 74 20 | 73 68 6f 77 6d 6f 75 6e | mount |showmoun|
|00005240| 74 0a 79 70 62 69 6e 64 | 20 20 20 20 20 20 20 20 |t.ypbind| |
|00005250| 20 20 31 30 30 30 30 37 | 0a 77 61 6c 6c 64 20 20 | 100007|.walld |
|00005260| 20 20 20 20 20 20 20 20 | 20 31 30 30 30 30 38 20 | | 100008 |
|00005270| 20 72 77 61 6c 6c 20 73 | 68 75 74 64 6f 77 6e 0a | rwall s|hutdown.|
|00005280| 79 70 70 61 73 73 77 64 | 64 20 20 20 20 20 20 20 |yppasswd|d |
|00005290| 31 30 30 30 30 39 20 20 | 79 70 70 61 73 73 77 64 |100009 |yppasswd|
|000052a0| 0a 62 6f 6f 74 70 61 72 | 61 6d 20 20 20 20 20 20 |.bootpar|am |
|000052b0| 20 31 30 30 30 32 36 0a | 79 70 75 70 64 61 74 65 | 100026.|ypupdate|
|000052c0| 64 20 20 20 20 20 20 20 | 31 30 30 30 32 38 20 20 |d |100028 |
|000052d0| 79 70 75 70 64 61 74 65 | 0a 5c 65 6e 64 7b 76 65 |ypupdate|.\end{ve|
|000052e0| 72 62 61 74 69 6d 7d 0a | 5c 65 6e 64 7b 74 73 63 |rbatim}.|\end{tsc|
|000052f0| 72 65 65 6e 7d 0a 20 5c | 63 61 70 74 69 6f 6e 7b |reen}. \|caption{|
|00005300| 0a 20 20 5c 6c 61 62 65 | 6c 7b 72 70 63 2e 66 69 |. \labe|l{rpc.fi|
|00005310| 67 7d 0a 20 20 41 20 73 | 61 6d 70 6c 65 20 5c 66 |g}. A s|ample \f|
|00005320| 69 6c 65 7b 2f 65 74 63 | 2f 72 70 63 7d 20 66 69 |ile{/etc|/rpc} fi|
|00005330| 6c 65 2e 0a 20 7d 0a 5c | 65 6e 64 7b 66 69 67 75 |le.. }.\|end{figu|
|00005340| 72 65 7d 0a 0a 0a 49 6e | 20 54 43 50 2f 49 50 20 |re}...In| TCP/IP |
|00005350| 6e 65 74 77 6f 72 6b 73 | 2c 20 74 68 65 20 61 75 |networks|, the au|
|00005360| 74 68 6f 72 73 20 6f 66 | 20 52 50 43 20 77 65 72 |thors of| RPC wer|
|00005370| 65 20 66 61 63 65 64 20 | 77 69 74 68 20 20 74 68 |e faced |with th|
|00005380| 65 20 70 72 6f 62 6c 65 | 6d 20 6f 66 0a 6d 61 70 |e proble|m of.map|
|00005390| 70 69 6e 67 20 70 72 6f | 67 72 61 6d 20 6e 75 6d |ping pro|gram num|
|000053a0| 62 65 72 73 20 74 6f 20 | 67 65 6e 65 72 69 63 20 |bers to |generic |
|000053b0| 6e 65 74 77 6f 72 6b 20 | 73 65 72 76 69 63 65 73 |network |services|
|000053c0| 2e 20 54 68 65 79 0a 63 | 68 6f 73 65 20 74 6f 20 |. They.c|hose to |
|000053d0| 68 61 76 65 20 65 61 63 | 68 20 73 65 72 76 65 72 |have eac|h server|
|000053e0| 20 70 72 6f 76 69 64 65 | 20 62 6f 74 68 20 61 20 | provide| both a |
|000053f0| 54 43 50 20 61 6e 64 20 | 61 20 55 44 50 20 70 6f |TCP and |a UDP po|
|00005400| 72 74 20 66 6f 72 20 65 | 61 63 68 0a 70 72 6f 67 |rt for e|ach.prog|
|00005410| 72 61 6d 20 61 6e 64 20 | 65 61 63 68 20 76 65 72 |ram and |each ver|
|00005420| 73 69 6f 6e 2e 20 47 65 | 6e 65 72 61 6c 6c 79 2c |sion. Ge|nerally,|
|00005430| 20 52 50 43 20 61 70 70 | 6c 69 63 61 74 69 6f 6e | RPC app|lication|
|00005440| 73 20 77 69 6c 6c 20 75 | 73 65 20 55 44 50 20 77 |s will u|se UDP w|
|00005450| 68 65 6e 0a 73 65 6e 64 | 69 6e 67 20 64 61 74 61 |hen.send|ing data|
|00005460| 2c 20 61 6e 64 20 6f 6e | 6c 79 20 66 61 6c 6c 20 |, and on|ly fall |
|00005470| 62 61 63 6b 20 74 6f 20 | 54 43 50 20 77 68 65 6e |back to |TCP when|
|00005480| 20 74 68 65 20 64 61 74 | 61 20 74 6f 20 62 65 20 | the dat|a to be |
|00005490| 74 72 61 6e 73 66 65 72 | 72 65 64 0a 64 6f 65 73 |transfer|red.does|
|000054a0| 6e 27 74 20 66 69 74 20 | 69 6e 74 6f 20 61 20 73 |n't fit |into a s|
|000054b0| 69 6e 67 6c 65 20 55 44 | 50 20 64 61 74 61 67 72 |ingle UD|P datagr|
|000054c0| 61 6d 2e 0a 0a 0a 5c 69 | 6e 64 65 78 7b 70 6f 72 |am....\i|ndex{por|
|000054d0| 74 6d 61 70 70 65 72 20 | 64 61 65 6d 6f 6e 7d 0a |tmapper |daemon}.|
|000054e0| 5c 69 6e 64 65 78 7b 52 | 65 6d 6f 74 65 20 50 72 |\index{R|emote Pr|
|000054f0| 6f 63 65 64 75 72 65 20 | 43 61 6c 6c 21 6d 61 70 |ocedure |Call!map|
|00005500| 70 69 6e 67 20 70 6f 72 | 74 73 20 74 6f 20 70 72 |ping por|ts to pr|
|00005510| 6f 67 72 61 6d 73 7d 0a | 5c 69 6e 64 65 78 7b 70 |ograms}.|\index{p|
|00005520| 6f 72 74 6d 61 70 40 5c | 70 72 6f 67 7b 70 6f 72 |ortmap@\|prog{por|
|00005530| 74 6d 61 70 7d 7d 0a 4f | 66 20 63 6f 75 72 73 65 |tmap}}.O|f course|
|00005540| 2c 20 63 6c 69 65 6e 74 | 20 70 72 6f 67 72 61 6d |, client| program|
|00005550| 73 20 68 61 76 65 20 74 | 6f 20 68 61 76 65 20 61 |s have t|o have a|
|00005560| 20 77 61 79 20 74 6f 20 | 66 69 6e 64 20 6f 75 74 | way to |find out|
|00005570| 20 77 68 69 63 68 20 70 | 6f 72 74 0a 61 20 70 72 | which p|ort.a pr|
|00005580| 6f 67 72 61 6d 20 6e 75 | 6d 62 65 72 20 6d 61 70 |ogram nu|mber map|
|00005590| 73 20 74 6f 2e 20 55 73 | 69 6e 67 20 61 20 63 6f |s to. Us|ing a co|
|000055a0| 6e 66 69 67 75 72 61 74 | 69 6f 6e 20 66 69 6c 65 |nfigurat|ion file|
|000055b0| 20 66 6f 72 20 74 68 69 | 73 20 77 6f 75 6c 64 20 | for thi|s would |
|000055c0| 62 65 0a 74 6f 6f 20 75 | 6e 66 6c 65 78 69 62 6c |be.too u|nflexibl|
|000055d0| 65 3b 20 73 69 6e 63 65 | 20 52 50 43 20 61 70 70 |e; since| RPC app|
|000055e0| 6c 69 63 61 74 69 6f 6e | 73 20 64 6f 6e 27 74 20 |lication|s don't |
|000055f0| 75 73 65 20 72 65 73 65 | 72 76 65 64 20 70 6f 72 |use rese|rved por|
|00005600| 74 73 2c 20 74 68 65 72 | 65 27 73 0a 6e 6f 20 67 |ts, ther|e's.no g|
|00005610| 75 61 72 61 6e 74 65 65 | 20 74 68 61 74 20 61 20 |uarantee| that a |
|00005620| 70 6f 72 74 20 6f 72 69 | 67 69 6e 61 6c 6c 79 20 |port ori|ginally |
|00005630| 6d 65 61 6e 74 20 74 6f | 20 62 65 20 75 73 65 64 |meant to| be used|
|00005640| 20 62 79 20 6f 75 72 20 | 64 61 74 61 62 61 73 65 | by our |database|
|00005650| 0a 61 70 70 6c 69 63 61 | 74 69 6f 6e 20 68 61 73 |.applica|tion has|
|00005660| 6e 27 74 20 62 65 65 6e | 20 74 61 6b 65 6e 20 62 |n't been| taken b|
|00005670| 79 20 73 6f 6d 65 20 6f | 74 68 65 72 20 70 72 6f |y some o|ther pro|
|00005680| 63 65 73 73 2e 20 54 68 | 65 72 65 66 6f 72 65 2c |cess. Th|erefore,|
|00005690| 20 52 50 43 0a 61 70 70 | 6c 69 63 61 74 69 6f 6e | RPC.app|lication|
|000056a0| 73 20 70 69 63 6b 20 61 | 6e 79 20 70 6f 72 74 20 |s pick a|ny port |
|000056b0| 74 68 65 79 20 63 61 6e | 20 67 65 74 2c 20 61 6e |they can| get, an|
|000056c0| 64 20 72 65 67 69 73 74 | 65 72 20 69 74 20 77 69 |d regist|er it wi|
|000056d0| 74 68 20 74 68 65 20 73 | 6f 2d 63 61 6c 6c 65 64 |th the s|o-called|
|000056e0| 0a 5c 65 6d 70 68 7b 70 | 6f 72 74 6d 61 70 70 65 |.\emph{p|ortmappe|
|000056f0| 72 20 64 61 65 6d 6f 6e | 7d 2e 20 54 68 65 20 6c |r daemon|}. The l|
|00005700| 61 74 74 65 72 20 61 63 | 74 73 20 61 73 20 61 20 |atter ac|ts as a |
|00005710| 73 65 72 76 69 63 65 20 | 62 72 6f 6b 65 72 20 66 |service |broker f|
|00005720| 6f 72 20 61 6c 6c 0a 52 | 50 43 20 73 65 72 76 65 |or all.R|PC serve|
|00005730| 72 73 20 72 75 6e 6e 69 | 6e 67 20 6f 6e 20 69 74 |rs runni|ng on it|
|00005740| 73 20 6d 61 63 68 69 6e | 65 3a 20 61 20 63 6c 69 |s machin|e: a cli|
|00005750| 65 6e 74 20 74 68 61 74 | 20 77 69 73 68 65 73 20 |ent that| wishes |
|00005760| 74 6f 20 63 6f 6e 74 61 | 63 74 0a 61 20 73 65 72 |to conta|ct.a ser|
|00005770| 76 69 63 65 20 77 69 74 | 68 20 61 20 67 69 76 65 |vice wit|h a give|
|00005780| 6e 20 70 72 6f 67 72 61 | 6d 20 6e 75 6d 62 65 72 |n progra|m number|
|00005790| 20 77 69 6c 6c 20 66 69 | 72 73 74 20 71 75 65 72 | will fi|rst quer|
|000057a0| 79 20 74 68 65 20 70 6f | 72 74 6d 61 70 70 65 72 |y the po|rtmapper|
|000057b0| 0a 6f 6e 20 74 68 65 20 | 73 65 72 76 65 72 27 73 |.on the |server's|
|000057c0| 20 68 6f 73 74 20 77 68 | 69 63 68 20 72 65 74 75 | host wh|ich retu|
|000057d0| 72 6e 73 20 74 68 65 20 | 54 43 50 20 61 6e 64 20 |rns the |TCP and |
|000057e0| 55 44 50 20 70 6f 72 74 | 20 6e 75 6d 62 65 72 73 |UDP port| numbers|
|000057f0| 20 74 68 65 0a 73 65 72 | 76 69 63 65 20 63 61 6e | the.ser|vice can|
|00005800| 20 62 65 20 72 65 61 63 | 68 65 64 20 61 74 2e 0a | be reac|hed at..|
|00005810| 0a 0a 5c 69 6e 64 65 78 | 7b 69 6e 65 74 64 40 5c |..\index|{inetd@\|
|00005820| 70 72 6f 67 7b 69 6e 65 | 74 64 7d 7d 0a 54 68 69 |prog{ine|td}}.Thi|
|00005830| 73 20 6d 65 74 68 6f 64 | 20 68 61 73 20 74 68 65 |s method| has the|
|00005840| 20 70 61 72 74 69 63 75 | 6c 61 72 20 64 72 61 77 | particu|lar draw|
|00005850| 62 61 63 6b 20 74 68 61 | 74 20 69 74 20 69 6e 74 |back tha|t it int|
|00005860| 72 6f 64 75 63 65 73 20 | 61 20 73 69 6e 67 6c 65 |roduces |a single|
|00005870| 20 70 6f 69 6e 74 0a 6f | 66 20 66 61 69 6c 75 72 | point.o|f failur|
|00005880| 65 2c 20 6d 75 63 68 20 | 6c 69 6b 65 20 74 68 65 |e, much |like the|
|00005890| 20 5c 70 72 6f 67 7b 69 | 6e 65 74 64 7d 20 64 61 | \prog{i|netd} da|
|000058a0| 65 6d 6f 6e 20 64 6f 65 | 73 20 66 6f 72 20 74 68 |emon doe|s for th|
|000058b0| 65 20 73 74 61 6e 64 61 | 72 64 0a 42 65 72 6b 65 |e standa|rd.Berke|
|000058c0| 6c 65 79 20 73 65 72 76 | 69 63 65 73 2e 20 48 6f |ley serv|ices. Ho|
|000058d0| 77 65 76 65 72 2c 20 74 | 68 69 73 20 63 61 73 65 |wever, t|his case|
|000058e0| 20 69 73 20 65 76 65 6e | 20 61 20 6c 69 74 74 6c | is even| a littl|
|000058f0| 65 20 77 6f 72 73 65 2c | 20 62 65 63 61 75 73 65 |e worse,| because|
|00005900| 0a 77 68 65 6e 20 74 68 | 65 20 70 6f 72 74 6d 61 |.when th|e portma|
|00005910| 70 70 65 72 20 64 69 65 | 73 2c 20 61 6c 6c 20 52 |pper die|s, all R|
|00005920| 50 43 20 70 6f 72 74 20 | 69 6e 66 6f 72 6d 61 74 |PC port |informat|
|00005930| 69 6f 6e 20 69 73 20 6c | 6f 73 74 3b 20 74 68 69 |ion is l|ost; thi|
|00005940| 73 0a 75 73 75 61 6c 6c | 79 20 6d 65 61 6e 73 20 |s.usuall|y means |
|00005950| 79 6f 75 20 68 61 76 65 | 20 74 6f 20 72 65 73 74 |you have| to rest|
|00005960| 61 72 74 20 61 6c 6c 20 | 52 50 43 20 73 65 72 76 |art all |RPC serv|
|00005970| 65 72 73 20 6d 61 6e 75 | 61 6c 6c 79 2c 20 6f 72 |ers manu|ally, or|
|00005980| 20 72 65 62 6f 6f 74 0a | 74 68 65 20 65 6e 74 69 | reboot.|the enti|
|00005990| 72 65 20 6d 61 63 68 69 | 6e 65 2e 0a 0a 0a 4f 6e |re machi|ne....On|
|000059a0| 20 5c 6c 69 6e 75 78 7b | 7d 2c 20 74 68 65 20 70 | \linux{|}, the p|
|000059b0| 6f 72 74 6d 61 70 70 65 | 72 20 69 73 20 63 61 6c |ortmappe|r is cal|
|000059c0| 6c 65 64 20 5c 70 72 6f | 67 7b 72 70 63 2e 70 6f |led \pro|g{rpc.po|
|000059d0| 72 74 6d 61 70 7d 20 61 | 6e 64 20 72 65 73 69 64 |rtmap} a|nd resid|
|000059e0| 65 73 0a 69 6e 20 5c 66 | 69 6c 65 7b 2f 75 73 72 |es.in \f|ile{/usr|
|000059f0| 2f 73 62 69 6e 7d 2e 20 | 4f 74 68 65 72 20 74 68 |/sbin}. |Other th|
|00005a00| 61 6e 20 6d 61 6b 69 6e | 67 20 73 75 72 65 20 69 |an makin|g sure i|
|00005a10| 74 20 69 73 20 73 74 61 | 72 74 65 64 20 66 6f 72 |t is sta|rted for|
|00005a20| 6d 0a 5c 70 72 6f 67 7b | 72 63 2e 69 6e 65 74 32 |m.\prog{|rc.inet2|
|00005a30| 7d 2c 20 74 68 65 20 70 | 6f 72 74 6d 61 70 70 65 |}, the p|ortmappe|
|00005a40| 72 20 64 6f 65 73 6e 27 | 74 20 72 65 71 75 69 72 |r doesn'|t requir|
|00005a50| 65 20 61 6e 79 20 63 6f | 6e 66 69 67 75 72 61 74 |e any co|nfigurat|
|00005a60| 69 6f 6e 20 77 6f 72 6b | 2e 0a 0a 5c 69 6e 64 65 |ion work|...\inde|
|00005a70| 78 7b 52 65 6d 6f 74 65 | 20 50 72 6f 63 65 64 75 |x{Remote| Procedu|
|00005a80| 72 65 20 43 61 6c 6c 7c | 29 7d 0a 0a 0a 5c 73 65 |re Call||)}...\se|
|00005a90| 63 74 69 6f 6e 7b 43 6f | 6e 66 69 67 75 72 69 6e |ction{Co|nfigurin|
|00005aa0| 67 20 74 68 65 20 5c 70 | 72 6f 67 7b 72 7d 20 43 |g the \p|rog{r} C|
|00005ab0| 6f 6d 6d 61 6e 64 73 7d | 0a 25 25 25 25 25 25 25 |ommands}|.%%%%%%%|
|00005ac0| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|00005ad0| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|00005ae0| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|00005af0| 25 25 25 25 25 25 25 25 | 25 25 0a 5c 6c 61 62 65 |%%%%%%%%|%%.\labe|
|00005b00| 6c 7b 61 70 70 6c 2e 72 | 65 6d 6f 74 65 7d 0a 5c |l{appl.r|emote}.\|
|00005b10| 69 6e 64 65 78 7b 63 6f | 6e 66 69 67 75 72 69 6e |index{co|nfigurin|
|00005b20| 67 21 74 68 65 20 72 20 | 63 6f 6d 6d 61 6e 64 73 |g!the r |commands|
|00005b30| 40 74 68 65 20 5c 70 72 | 6f 67 7b 72 7d 20 63 6f |@the \pr|og{r} co|
|00005b40| 6d 6d 61 6e 64 73 7c 28 | 7d 0a 5c 69 6e 64 65 78 |mmands|(|}.\index|
|00005b50| 7b 61 75 74 68 6f 72 69 | 7a 61 74 69 6f 6e 21 61 |{authori|zation!a|
|00005b60| 6e 64 20 72 20 63 6f 6d | 6d 61 6e 64 73 40 61 6e |nd r com|mands@an|
|00005b70| 64 20 5c 70 72 6f 67 7b | 72 7d 20 63 6f 6d 6d 61 |d \prog{|r} comma|
|00005b80| 6e 64 73 7d 0a 5c 69 6e | 64 65 78 7b 4c 41 4e 21 |nds}.\in|dex{LAN!|
|00005b90| 72 20 63 6f 6d 6d 61 6e | 64 73 40 5c 70 72 6f 67 |r comman|ds@\prog|
|00005ba0| 7b 72 7d 20 63 6f 6d 6d | 61 6e 64 73 7d 0a 5c 69 |{r} comm|ands}.\i|
|00005bb0| 6e 64 65 78 7b 4c 41 4e | 21 70 61 73 73 77 6f 72 |ndex{LAN|!passwor|
|00005bc0| 64 73 7d 0a 5c 69 6e 64 | 65 78 7b 70 61 73 73 77 |ds}.\ind|ex{passw|
|00005bd0| 6f 72 64 73 21 61 6e 64 | 20 72 65 6d 6f 74 65 20 |ords!and| remote |
|00005be0| 6c 6f 67 69 6e 7d 0a 5c | 69 6e 64 65 78 7b 72 65 |login}.\|index{re|
|00005bf0| 6d 6f 74 65 21 63 6f 6d | 6d 61 6e 64 20 65 78 65 |mote!com|mand exe|
|00005c00| 63 75 74 69 6f 6e 7d 0a | 5c 69 6e 64 65 78 7b 73 |cution}.|\index{s|
|00005c10| 65 63 75 72 69 74 79 21 | 72 20 63 6f 6d 6d 61 6e |ecurity!|r comman|
|00005c20| 64 73 40 5c 70 72 6f 67 | 7b 72 7d 20 63 6f 6d 6d |ds@\prog|{r} comm|
|00005c30| 61 6e 64 73 7d 0a 5c 69 | 6e 64 65 78 7b 73 65 63 |ands}.\i|ndex{sec|
|00005c40| 75 72 69 74 79 21 72 65 | 6d 6f 74 65 20 6c 6f 67 |urity!re|mote log|
|00005c50| 69 6e 7d 0a 5c 69 6e 64 | 65 78 7b 72 65 6d 6f 74 |in}.\ind|ex{remot|
|00005c60| 65 21 6c 6f 67 69 6e 7d | 0a 5c 69 6e 64 65 78 7b |e!login}|.\index{|
|00005c70| 72 65 6d 6f 74 65 21 66 | 69 6c 65 20 61 63 63 65 |remote!f|ile acce|
|00005c80| 73 73 7d 0a 5c 69 6e 64 | 65 78 7b 72 6c 6f 67 69 |ss}.\ind|ex{rlogi|
|00005c90| 6e 40 5c 70 72 6f 67 7b | 72 6c 6f 67 69 6e 7d 7d |n@\prog{|rlogin}}|
|00005ca0| 0a 5c 69 6e 64 65 78 7b | 72 63 70 40 5c 70 72 6f |.\index{|rcp@\pro|
|00005cb0| 67 7b 72 63 70 7d 7d 0a | 5c 69 6e 64 65 78 7b 72 |g{rcp}}.|\index{r|
|00005cc0| 73 68 40 5c 70 72 6f 67 | 7b 72 73 68 7d 7d 0a 0a |sh@\prog|{rsh}}..|
|00005cd0| 54 68 65 72 65 20 61 72 | 65 20 61 20 6e 75 6d 62 |There ar|e a numb|
|00005ce0| 65 72 20 6f 66 20 63 6f | 6d 6d 61 6e 64 73 20 66 |er of co|mmands f|
|00005cf0| 6f 72 20 65 78 65 63 75 | 74 69 6e 67 20 63 6f 6d |or execu|ting com|
|00005d00| 6d 61 6e 64 73 20 6f 6e | 20 72 65 6d 6f 74 65 0a |mands on| remote.|
|00005d10| 68 6f 73 74 73 2e 20 54 | 68 65 73 65 20 61 72 65 |hosts. T|hese are|
|00005d20| 20 5c 70 72 6f 67 7b 72 | 6c 6f 67 69 6e 7d 2c 20 | \prog{r|login}, |
|00005d30| 5c 70 72 6f 67 7b 72 73 | 68 7d 2c 20 5c 70 72 6f |\prog{rs|h}, \pro|
|00005d40| 67 7b 72 63 70 7d 20 61 | 6e 64 20 5c 70 72 6f 67 |g{rcp} a|nd \prog|
|00005d50| 7b 72 63 6d 64 7d 2e 0a | 54 68 65 79 20 61 6c 6c |{rcmd}..|They all|
|00005d60| 20 73 70 61 77 6e 20 61 | 20 73 68 65 6c 6c 20 6f | spawn a| shell o|
|00005d70| 6e 20 74 68 65 20 72 65 | 6d 6f 74 65 20 68 6f 73 |n the re|mote hos|
|00005d80| 74 20 61 6e 64 20 61 6c | 6c 6f 77 20 74 68 65 20 |t and al|low the |
|00005d90| 75 73 65 72 0a 74 6f 20 | 65 78 65 63 75 74 65 20 |user.to |execute |
|00005da0| 63 6f 6d 6d 61 6e 64 73 | 2e 20 4f 66 20 63 6f 75 |commands|. Of cou|
|00005db0| 72 73 65 2c 20 74 68 65 | 20 63 6c 69 65 6e 74 20 |rse, the| client |
|00005dc0| 6e 65 65 64 73 20 74 6f | 20 68 61 76 65 20 61 6e |needs to| have an|
|00005dd0| 20 61 63 63 6f 75 6e 74 | 0a 6f 6e 20 74 68 65 20 | account|.on the |
|00005de0| 68 6f 73 74 20 77 68 65 | 72 65 20 74 68 65 20 63 |host whe|re the c|
|00005df0| 6f 6d 6d 6d 61 6e 64 20 | 69 73 20 74 6f 20 62 65 |ommmand |is to be|
|00005e00| 20 65 78 65 63 75 74 65 | 64 2e 20 54 68 75 73 20 | execute|d. Thus |
|00005e10| 61 6c 6c 20 74 68 65 73 | 65 20 63 6f 6d 6d 61 6e |all thes|e comman|
|00005e20| 64 73 0a 70 65 72 66 6f | 72 6d 20 61 6e 20 61 75 |ds.perfo|rm an au|
|00005e30| 74 68 6f 72 69 7a 61 74 | 69 6f 6e 20 70 72 6f 63 |thorizat|ion proc|
|00005e40| 65 64 75 72 65 2e 20 55 | 73 75 61 6c 6c 79 2c 20 |edure. U|sually, |
|00005e50| 74 68 65 20 63 6c 69 65 | 6e 74 20 77 69 6c 6c 20 |the clie|nt will |
|00005e60| 74 65 6c 6c 0a 74 68 65 | 20 75 73 65 72 27 73 20 |tell.the| user's |
|00005e70| 6c 6f 67 69 6e 20 6e 61 | 6d 65 20 74 6f 20 74 68 |login na|me to th|
|00005e80| 65 20 73 65 72 76 65 72 | 2c 20 77 68 69 63 68 20 |e server|, which |
|00005e90| 69 6e 20 74 75 72 6e 20 | 72 65 71 75 65 73 74 73 |in turn |requests|
|00005ea0| 20 61 20 70 61 73 73 77 | 6f 72 64 0a 74 68 61 74 | a passw|ord.that|
|00005eb0| 20 69 73 20 76 61 6c 69 | 64 61 74 65 64 20 69 6e | is vali|dated in|
|00005ec0| 20 74 68 65 20 75 73 75 | 61 6c 20 77 61 79 2e 0a | the usu|al way..|
|00005ed0| 0a 0a 53 6f 6d 65 74 69 | 6d 65 73 2c 20 68 6f 77 |..Someti|mes, how|
|00005ee0| 65 76 65 72 2c 20 69 74 | 20 69 73 20 64 65 73 69 |ever, it| is desi|
|00005ef0| 72 61 62 6c 65 20 74 6f | 20 72 65 6c 61 78 20 61 |rable to| relax a|
|00005f00| 75 74 68 6f 72 69 7a 61 | 74 69 6f 6e 20 63 68 65 |uthoriza|tion che|
|00005f10| 63 6b 73 20 66 6f 72 0a | 63 65 72 74 61 69 6e 20 |cks for.|certain |
|00005f20| 75 73 65 72 73 2e 20 20 | 46 6f 72 20 69 6e 73 74 |users. |For inst|
|00005f30| 61 6e 63 65 2c 20 69 66 | 20 79 6f 75 20 66 72 65 |ance, if| you fre|
|00005f40| 71 75 65 6e 74 6c 79 20 | 68 61 76 65 20 74 6f 20 |quently |have to |
|00005f50| 6c 6f 67 20 69 6e 74 6f | 20 6f 74 68 65 72 0a 6d |log into| other.m|
|00005f60| 61 63 68 69 6e 65 73 20 | 6f 6e 20 79 6f 75 72 20 |achines |on your |
|00005f70| 4c 41 4e 2c 20 79 6f 75 | 20 6d 69 67 68 74 20 77 |LAN, you| might w|
|00005f80| 61 6e 74 20 74 6f 20 62 | 65 20 61 64 6d 69 74 74 |ant to b|e admitt|
|00005f90| 65 64 20 77 69 74 68 6f | 75 74 20 68 61 76 69 6e |ed witho|ut havin|
|00005fa0| 67 20 74 6f 0a 74 79 70 | 65 20 79 6f 75 72 20 70 |g to.typ|e your p|
|00005fb0| 61 73 73 77 6f 72 64 20 | 65 76 65 72 79 20 74 69 |assword |every ti|
|00005fc0| 6d 65 2e 0a 25 20 4f 6e | 20 6f 6e 65 20 68 61 6e |me..% On| one han|
|00005fd0| 64 2c 20 74 68 69 73 20 | 69 73 20 61 20 71 75 65 |d, this |is a que|
|00005fe0| 73 74 69 6f 6e 20 6f 66 | 20 63 6f 6e 76 65 6e 69 |stion of| conveni|
|00005ff0| 65 6e 63 65 2c 20 6f 6e | 20 74 68 65 20 6f 74 68 |ence, on| the oth|
|00006000| 65 72 20 69 74 20 6d 61 | 79 20 62 65 0a 25 20 61 |er it ma|y be.% a|
|00006010| 20 6d 61 74 74 65 72 20 | 6f 66 20 73 65 63 75 72 | matter |of secur|
|00006020| 69 74 79 20 6e 6f 74 20 | 68 61 76 69 6e 67 20 74 |ity not |having t|
|00006030| 6f 20 73 65 6e 64 20 79 | 6f 75 72 20 70 61 73 73 |o send y|our pass|
|00006040| 77 6f 72 64 20 61 63 72 | 6f 73 73 20 61 6e 20 69 |word acr|oss an i|
|00006050| 6e 73 65 63 75 72 65 0a | 25 20 6e 65 74 77 6f 72 |nsecure.|% networ|
|00006060| 6b 20 65 76 65 72 79 20 | 74 69 6d 65 20 79 6f 75 |k every |time you|
|00006070| 20 6c 6f 67 20 69 6e 2e | 0a 0a 0a 44 69 73 61 62 | log in.|...Disab|
|00006080| 6c 69 6e 67 20 61 75 74 | 68 6f 72 69 7a 61 74 69 |ling aut|horizati|
|00006090| 6f 6e 20 69 73 20 61 64 | 76 69 73 61 62 6c 65 20 |on is ad|visable |
|000060a0| 6f 6e 6c 79 20 6f 6e 20 | 61 20 73 6d 61 6c 6c 20 |only on |a small |
|000060b0| 6e 75 6d 62 65 72 20 6f | 66 20 68 6f 73 74 73 0a |number o|f hosts.|
|000060c0| 77 68 6f 73 65 20 70 61 | 73 73 77 6f 72 64 20 64 |whose pa|ssword d|
|000060d0| 61 74 61 62 61 73 65 73 | 20 61 72 65 20 73 79 6e |atabases| are syn|
|000060e0| 63 68 72 6f 6e 69 7a 65 | 64 2c 20 6f 72 20 66 6f |chronize|d, or fo|
|000060f0| 72 20 61 20 73 6d 61 6c | 6c 20 6e 75 6d 62 65 72 |r a smal|l number|
|00006100| 20 6f 66 0a 70 72 69 76 | 69 6c 65 67 65 64 20 75 | of.priv|ileged u|
|00006110| 73 65 72 73 20 77 68 6f | 20 6e 65 65 64 20 74 6f |sers who| need to|
|00006120| 20 61 63 63 65 73 73 20 | 6d 61 6e 79 20 6d 61 63 | access |many mac|
|00006130| 68 69 6e 65 73 20 66 6f | 72 20 61 64 6d 69 6e 69 |hines fo|r admini|
|00006140| 73 74 72 61 74 69 76 65 | 0a 72 65 61 73 6f 6e 73 |strative|.reasons|
|00006150| 2e 20 57 68 65 6e 65 76 | 65 72 20 79 6f 75 20 77 |. Whenev|er you w|
|00006160| 61 6e 74 20 74 6f 20 61 | 6c 6c 6f 77 20 70 65 6f |ant to a|llow peo|
|00006170| 70 6c 65 20 74 6f 20 6c | 6f 67 20 69 6e 74 6f 20 |ple to l|og into |
|00006180| 79 6f 75 72 20 68 6f 73 | 74 20 77 69 74 68 6f 75 |your hos|t withou|
|00006190| 74 0a 68 61 76 69 6e 67 | 20 74 6f 20 73 70 65 63 |t.having| to spec|
|000061a0| 69 66 79 20 61 20 6c 6f | 67 69 6e 20 69 64 20 6f |ify a lo|gin id o|
|000061b0| 72 20 70 61 73 73 77 6f | 72 64 2c 20 6d 61 6b 65 |r passwo|rd, make|
|000061c0| 20 73 75 72 65 20 74 68 | 61 74 20 79 6f 75 20 64 | sure th|at you d|
|000061d0| 6f 6e 27 74 0a 61 63 63 | 69 64 65 6e 74 61 6c 6c |on't.acc|identall|
|000061e0| 79 20 67 72 61 6e 74 20 | 61 63 63 65 73 73 20 74 |y grant |access t|
|000061f0| 6f 20 61 6e 79 62 6f 64 | 79 20 65 6c 73 65 2e 0a |o anybod|y else..|
|00006200| 0a 0a 5c 69 6e 64 65 78 | 7b 68 6f 73 74 73 2e 65 |..\index|{hosts.e|
|00006210| 71 75 69 76 40 5c 66 69 | 6c 65 7b 68 6f 73 74 73 |quiv@\fi|le{hosts|
|00006220| 2e 65 71 75 69 76 7d 7d | 0a 5c 69 6e 64 65 78 7b |.equiv}}|.\index{|
|00006230| 72 68 6f 73 74 73 40 5c | 66 69 6c 65 7b 2e 72 68 |rhosts@\|file{.rh|
|00006240| 6f 73 74 73 7d 7d 0a 54 | 68 65 72 65 20 61 72 65 |osts}}.T|here are|
|00006250| 20 74 77 6f 20 77 61 79 | 73 20 74 6f 20 64 69 73 | two way|s to dis|
|00006260| 61 62 6c 65 20 61 75 74 | 68 6f 72 69 7a 61 74 69 |able aut|horizati|
|00006270| 6f 6e 20 63 68 65 63 6b | 73 20 66 6f 72 20 74 68 |on check|s for th|
|00006280| 65 20 5c 66 69 6c 65 7b | 72 7d 0a 63 6f 6d 6d 61 |e \file{|r}.comma|
|00006290| 6e 64 73 2e 20 4f 6e 65 | 20 69 73 20 66 6f 72 20 |nds. One| is for |
|000062a0| 74 68 65 20 73 75 70 65 | 72 20 75 73 65 72 20 74 |the supe|r user t|
|000062b0| 6f 20 61 6c 6c 6f 77 20 | 63 65 72 74 61 69 6e 20 |o allow |certain |
|000062c0| 6f 72 20 61 6c 6c 0a 75 | 73 65 72 73 20 6f 6e 20 |or all.u|sers on |
|000062d0| 63 65 72 74 61 69 6e 20 | 6f 72 20 61 6c 6c 20 68 |certain |or all h|
|000062e0| 6f 73 74 73 20 28 74 68 | 65 20 6c 61 74 74 65 72 |osts (th|e latter|
|000062f0| 20 64 65 66 69 6e 69 74 | 65 6c 79 20 62 65 69 6e | definit|ely bein|
|00006300| 67 20 61 20 62 61 64 0a | 69 64 65 61 29 20 74 6f |g a bad.|idea) to|
|00006310| 20 6c 6f 67 20 69 6e 20 | 77 69 74 68 6f 75 74 20 | log in |without |
|00006320| 62 65 69 6e 67 20 61 73 | 6b 65 64 20 66 6f 72 20 |being as|ked for |
|00006330| 61 20 70 61 73 73 77 6f | 72 64 2e 20 54 68 69 73 |a passwo|rd. This|
|00006340| 20 61 63 63 65 73 73 0a | 69 73 20 63 6f 6e 74 72 | access.|is contr|
|00006350| 6f 6c 6c 65 64 20 62 79 | 20 61 20 66 69 6c 65 20 |olled by| a file |
|00006360| 63 61 6c 6c 65 64 20 5c | 66 69 6c 65 7b 2f 65 74 |called \|file{/et|
|00006370| 63 2f 68 6f 73 74 73 2e | 65 71 75 69 76 7d 2e 20 |c/hosts.|equiv}. |
|00006380| 49 74 20 63 6f 6e 74 61 | 69 6e 73 0a 61 20 6c 69 |It conta|ins.a li|
|00006390| 73 74 20 6f 66 20 68 6f | 73 74 20 61 6e 64 20 75 |st of ho|st and u|
|000063a0| 73 65 72 20 6e 61 6d 65 | 73 20 74 68 61 74 20 61 |ser name|s that a|
|000063b0| 72 65 20 63 6f 6e 73 69 | 64 65 72 65 64 20 65 71 |re consi|dered eq|
|000063c0| 75 69 76 61 6c 65 6e 74 | 20 74 6f 20 75 73 65 72 |uivalent| to user|
|000063d0| 73 0a 6f 6e 20 74 68 65 | 20 6c 6f 63 61 6c 20 68 |s.on the| local h|
|000063e0| 6f 73 74 2e 20 20 41 6e | 20 61 6c 74 65 72 6e 61 |ost. An| alterna|
|000063f0| 74 69 76 65 20 6f 70 74 | 69 6f 6e 20 69 73 20 66 |tive opt|ion is f|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.